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 set git-branch --track.


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -