[root@ test]$ git branch -a
* master
origin
remotes/origin/master
[root@ test]$ git branch
* master
origin
IMO origin is remote and master is local, what’s remotes/origin/master there for?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
git branchshows only local branches,git branch -ashows all branches, including remote-tracking branches.You’ve got local branches named
masterandorigin.remotes/origin/masteris a remote-tracking branch for themasterbranch in the remote repository namedorigin.Your local
masterprobably tracksremotes/origin/master. From that output, you can’t tell what’s up withorigin, but it’s likely either a product of a mistaken command or simply a poorly-chosen branch name. (You can dogit branch -vato get some more helpful information.)