How can I get my current branch compared with another remote branch in Git? not master -


when run git st(atus) in repository current branch set master, says:

on branch master branch up-to-date 'origin/master'. nothing commit, working directory clean 

but when run command when in branch blah, says:

on branch blah nothing commit, working directory clean 

i want checked remote branch (being ahead or behind remote branch blah)

how can that?

you need setup local branch blah to track remote branch origin/blah:

git checkout blah git branch --set-upstream-to=origin/blah 

or branch:

git branch --set-upstream-to=origin/blah blah 

you can nice summary of state of local branches compared remote ones track git status -vv

<branchname> <head-sha1> [<upstream/branchname>: ahead/behind num] <commit-message> 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -