git.rst
changeset 2409 6163ed9ff6de
parent 2403 f5347f511cb3
child 2414 aebcb023e71a
equal deleted inserted replaced
2408:c19423f2e7ee 2409:6163ed9ff6de
   172 
   172 
   173 List all known remote branches::
   173 List all known remote branches::
   174 
   174 
   175   $ git branch -r
   175   $ git branch -r
   176 
   176 
   177 List all remote branches (from all remotes)::
   177 List all remote branches directly from remote::
   178 
   178 
   179   $ git ls-remote
   179   $ git ls-remote
   180   $ git ls-remote origin
   180   $ git ls-remote origin
   181 
   181 
   182 List registered remotes::
   182 List registered remotes::
   183 
   183 
       
   184   $ git remote -v
       
   185   $ git remote
   184   $ git remote show
   186   $ git remote show
   185 
   187 
   186 List remote branches from ``$REMOTE`` remote::
   188 List remote branches from ``$REMOTE`` remote::
   187 
   189 
   188   $ git ls-remote --heads $REMOTE
   190   $ git ls-remote --heads $REMOTE
   245    Edit ``fetch`` value to change defaults.
   247    Edit ``fetch`` value to change defaults.
   246 
   248 
   247 Move branch pointer to arbitrary hash::
   249 Move branch pointer to arbitrary hash::
   248 
   250 
   249   $ git branch -f $NAME $HASH
   251   $ git branch -f $NAME $HASH
       
   252 
       
   253 Create local branch from remote with the same name::
       
   254 
       
   255   $ git checkout --track origin/fix
       
   256 
       
   257 Create local branch from remote with an alternative name::
       
   258 
       
   259   $ git checkout -b myfix origin/fix
   250 
   260 
   251 git analog of 'hg incoming'
   261 git analog of 'hg incoming'
   252 ===========================
   262 ===========================
   253 
   263 
   254 git does not directly support such feature. You can emulate it by::
   264 git does not directly support such feature. You can emulate it by::