Question : git patch staged to file
Answered by : lovely-lynx-nk3zdrlqnrgl
git diff --staged > mypatch.patch
Source : https://stackoverflow.com/questions/5159185/create-a-git-patch-from-the-uncommitted-changes-in-the-current-working-directory | Last Update : Tue, 19 Oct 21
Question : git save staged changes to file
Answered by : qpwo
git diff --patch --staged > changes.patch; git commit -m 'temp'; git reset --hard HEAD^
Source : | Last Update : Tue, 02 Nov 21