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
Post a Comment