Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You could use stash for just that use case (even multiple times to make multiple "patches").

For a more robuts method, you could also just commit (without pushing of course). Then, you can do "git reset --hard HEAD~1", and you have a pre-patch env ready for more work. When you need to re-do your commit, you can check reflog to get the ID.

Either way is, to me, an easier way to achieve the same result as patches.



Instead of looking up the commit hash in your reflog, you could also just create a branch on that commit and refer to the commit with the branch name.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: