Notes

Repo for code notes etc.

Track Upstream Branch in Git

  • Show upstream remotes:
1
2
3
4
5
6
7
8
9
10
11
12
13
$ git remote show octopress
* remote octopress
  Fetch URL: git://github.com/imathis/octopress.git
  Push  URL: git://github.com/imathis/octopress.git
  HEAD branch: master
  Remote branches:
    2.1                 tracked
    gh-pages            tracked
    linklog             tracked
    master              tracked
    refactor_with_tests tracked
    rubygemcli          tracked
    site                tracked
  • Create local branch tracking upstream:
1
2
3
$ git checkout -t -b rubygemcli octopress/rubygemcli
Branch rubygemcli set up to track remote branch rubygemcli from octopress.
Switched to a new branch 'rubygemcli'