# HG changeset patch # User Oleksandr Gavenko # Date 1580170794 -7200 # Node ID 6163ed9ff6de47c4fef6c16931c4221a27b25ee9 # Parent c19423f2e7eeee24a9550f1130ce2924de465f08 Create local branch from remote with the same name. diff -r c19423f2e7ee -r 6163ed9ff6de git.rst --- a/git.rst Sun Jan 26 15:50:46 2020 +0200 +++ b/git.rst Tue Jan 28 02:19:54 2020 +0200 @@ -174,13 +174,15 @@ $ git branch -r -List all remote branches (from all remotes):: +List all remote branches directly from remote:: $ git ls-remote $ git ls-remote origin List registered remotes:: + $ git remote -v + $ git remote $ git remote show List remote branches from ``$REMOTE`` remote:: @@ -248,6 +250,14 @@ $ git branch -f $NAME $HASH +Create local branch from remote with the same name:: + + $ git checkout --track origin/fix + +Create local branch from remote with an alternative name:: + + $ git checkout -b myfix origin/fix + git analog of 'hg incoming' ===========================