4 ms·
I've been using git for years and do `rebase -i` daily, bisect many spooky commands. However, I still don't know how I can update a branch and switch to it in o
by 0x457 4y ago
I've been using git for years and do `rebase -i` daily, bisect many spooky commands. However, I still don't know how I can update a branch and switch to it in one motion:
- not just update `origin/branch`
- not checkout `branch` and sync it with `origin/brach`
and it drives me crazy.
- NathanOsullivan 4y agoNot aware of a built in way, but if you use bash or similar as your shell you can do an alias like git config --global alias.chpull '!f() { git checkout "$1" && git pull; }; f'
- 0x457 4y agoDidn't think about alias for this even though I have alias for many other things, that should prevent `direnv` from triggering between checkout and pull. Thanks.