6 ms·
I've recently discovered `git switch -` and `git merge -`. It switches to the previous branch you were on or merges the previous branch you were own. No need t
by joehx2 2y ago
I've recently discovered `git switch -` and `git merge -`. It switches to the previous branch you were on or merges the previous branch you were own.
No need to know the name.
So if I need to pull updates on the previous branch I was on and merge them into my current branch, I can just:
git switch -
git pull
git switch -
git merge -
- yen223 2y agoFor those who may not know, `cd -` brings you to the previous directory.
- sethammons 2y agoUnfamiliar with 'switch'; i do 'git checkout -' all the time to toggle back and forth