4 ms·
My most useful bash alias (when you go back to master and want to start at the most up to date everything before creating a new branch): alias grm="git fetch
by poorman 10y ago
My most useful bash alias (when you go back to master and want to start at the most up to date everything before creating a new branch):
alias grm="git fetch origin && git reset --hard origin/master"
- etqwzutewzu 10y agosame here but I switch to master first: resync = !git reset --hard HEAD && git checkout master && git reset --hard origin/master && git pull or with a parameter to do the same with any branch: resync = "!f() { git reset --hard HEAD && git checkout $1 && git reset --hard @{u} && git pull ; }; f"
- derwiki 10y agoI use a very similar version of this, and people are often surprised that I'm working directly on master. Well, when it's ready to go, `git checkout -b feature/name; git push origin HEAD; git resync`.