# HG changeset patch # User Oleksandr Gavenko # Date 1487625562 -7200 # Node ID ce5d8887b874db68a21bea03f931dc311b6492f5 # Parent 325b195030bdaa011c3a00bd412c75796b01acc0 Making local branch tracking remote. diff -r 325b195030bd -r ce5d8887b874 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::