Git Noob Tips
Auto-Stash
🗓️ Published: 5/27/2022
This one is a child of tips 3 and 4. First of all, if we want to rebase every time we pull, why not make it the default? Also, if we want to stash our uncommited changes every time we pull/rebase, why not make it automated? That's what this tip is about:
git config --global pull.rebase true
git config --global rebase.autoStash true
By setting these config values, next time you have some changes in your local, you can still do a pull. The changes will be stashed, a rebase will happen on your branch, and the changes will be poped from the stash.