version control - Git syntactic sugar for "current branch"? -
i know in git can use - refer previous branch on.
so example, if i'm in tester branch , run git checkout master, decide want go tester, run git checkout - instead of git checkout tester.
my question this:
is there kind of syntactic sugar in git allows me reference current branch i'm in?
so instance, if i'm in master , want run git pull origin master, run instead git pull origin {current branch sugar}?
it's getting annoying having specify current branch name common commands push, pull, etc.
actually, git pull should enough, provided branch set upstream branch
git branch -u origin/master master so isn't syntactic sugar reference current branch: more default parameters of git commands.
git pull instance:
default values
<repository>,<branch>read "remote" , "merge" configuration current branch setgit-branch --track.
Comments
Post a Comment