It often happens that I'll be working on something and notice another commit has been made on the main branch. More often than not I can't pull without either stashing (or committing) my changes. So I always stash my changes, pull, then re-apply my own changes to continue.
So basically I need to do the stash -> pull -> apply
dance several times a day. Is there a feature I don't know about that will enable me to do this in one, and can it be done in Sourcetree?
Thanks.
This can solve your problem:
git pull --rebase --autostash