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

Could you not perhaps git fetch && git rebase origin/master (for instance, to pull remote changes into a local development branch)?


git fetch && git rebase origin/master, which is equivalent to git pull --rebase origin master, requires your worktree to be clean, so you must either commit or stash if you have any local changes.


    git config rebase.autoStash true


I think that's a very good way to have a long list of things stashed that you don't remember what they are. Commiting your changes is much better as you can add an explanation for your futur self.


Well it does auto-pop the stash as well if the rebase was successful. I've been using it for ages and never noticed a growing stash




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

Search: