3 ms·
Your workflow is a little overcomplicated.. I think the following will produce identical results: git pull --rebase branch-name
by mainguy 15y ago
Your workflow is a little overcomplicated.. I think the following will produce identical results:
git pull --rebase branch-name
- jrockway 15y agoHe is using "git stash" to create a commit object for his uncommitted changes, giving him more documentation in the event that Something Goes Wrong. Git will never throw away your data, but you might get into a weird mental state and type a command that throws away your data. By creating a commit object, you can always get back to that state, and you have a little one-line note-to-self that helps you not get into a weird mental state. I personally do a "real" commit before rebase, but "git stash" is really the exact same thing. I guess "git stash pop" is less scary than "git rebase HEAD^". Either way, you can always undo that operation via the reflog.