My favorite git alias: gcm to git checkout main|master, fetch, and pull
- # checkout to default branch
- gcm() {
- git fetch && git checkout $(git remote show origin | sed -n '/HEAD branch/s/.*: //p')
- }
(Put this in your .bashrc or something)
My favorite git alias: gcm to git checkout main|master, fetch, and pull
(Put this in your .bashrc or something)