Making local branch tracking remote.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 20 Feb 2017 23:19:22 +0200
changeset 2102 ce5d8887b874
parent 2101 325b195030bd
child 2103 a21980c282c8
Making local branch tracking remote.
git.rst
--- a/git.rst	Mon Feb 20 23:05:10 2017 +0200
+++ b/git.rst	Mon Feb 20 23:19:22 2017 +0200
@@ -206,11 +206,13 @@
   $ git fetch
   $ git log origin/master..master   # or just 'origin/master..'
 
-git analog of 'hg glog'.
-========================
+git analog of 'hg glog'
+=======================
 ::
 
   $ git log --all --graph
+  $ git log --all --graph --oneline
+  $ git log --all --graph --oneline --decorate
 
 Add alias::
 
@@ -228,14 +230,33 @@
 
   $ git rebase -i $REV
 
-Git analog of 'hg root'.
-========================
+Git analog of 'hg root'
+=======================
 ::
 
   $ git rev-parse --show-toplevel
 
-Debug git network operation.
-============================
+Making local branch tracking remote
+===================================
+::
+
+  $ git branch -u upstream/foo
+  $ git branch -u upstream/foo foo
+
+  $ git branch --set-upstream-to=upstream/foo
+  $ git branch --set-upstream-to=upstream/foo foo
+
+Showing what and how local branches are tracked::
+
+  $ git branch -vv
+  $ cat .git/gitconfig
+
+Showing what remote branches tracked::
+
+  $ git remote show $remote
+
+Debug git network operation
+===========================
 
 Git uses libcurl for network operation::