DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

Git Branch Note


List the relationship between all local branches and remote branches: git branch -vv.

Set an existing local branch to track a remote branch:

git checkout master
git branch -u origin/master

Or put all together: git branch -u origin/master master.

Ref:

How can I see which git branches are tracking which remote/upstream branch?

Make an existing Git branch track a remote branch?

Git Branching - What a Branch Is

Git Branching - Branches in a Nutshell

How does git store files?



Published

Feb 28, 2016

Last Updated

Mar 15, 2019

Category

Tech

Tags

  • branch 5
  • git 36

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor