git.rst
changeset 2084 376824d203c2
parent 2082 7f6ce6b18a0c
child 2085 652aca73fc06
equal deleted inserted replaced
2083:75ae6a4ad500 2084:376824d203c2
   126   $ git commit -m "..."
   126   $ git commit -m "..."
   127 
   127 
   128 Commit all changed and previously manages files::
   128 Commit all changed and previously manages files::
   129 
   129 
   130   $ git commit -a -m "...."
   130   $ git commit -a -m "...."
       
   131 
       
   132 Managing branches
       
   133 =================
       
   134 
       
   135 Print current branch::
       
   136 
       
   137   $ git branch
       
   138 
       
   139 List all known branches::
       
   140 
       
   141   $ git branch -a
       
   142 
       
   143 List all known remote branches::
       
   144 
       
   145   $ git branch -r
       
   146 
       
   147 List all remote branches (from all remotes)::
       
   148 
       
   149   $ git ls-remote
       
   150 
       
   151 List remote branches from ``$REMOTE`` remote::
       
   152 
       
   153   $ git ls-remote --heads $REMOTE
       
   154   $ git remote show $REMOTE
       
   155 
       
   156 .. note::
       
   157 
       
   158    Look to ``[remote "..."]`` in ``~/.git/config`` to find out names of possible
       
   159    remotes. Alternatively get list from::
       
   160 
       
   161      $ git remote show
       
   162 
       
   163 Getting branches pointers from default (``origin``) remote::
       
   164 
       
   165   $ git fetch
       
   166 
       
   167 Getting branches pointers from ``$REMOTE`` remote::
       
   168 
       
   169   $ git fetch $REMOTE
       
   170 
       
   171 .. note::
       
   172 
       
   173    Only curtain branches fetched by default::
       
   174 
       
   175      [remote "origin"]
       
   176 	 url = ...
       
   177 	 fetch = +refs/heads/*:refs/remotes/origin/*
       
   178 
       
   179    Edit ``fetch`` value to change defaults.
       
   180 
       
   181 
   131 
   182 
   132 git analog of 'hg incoming'.
   183 git analog of 'hg incoming'.
   133 ============================
   184 ============================
   134 
   185 
   135 git does not directly support such feature. You can emulate it by::
   186 git does not directly support such feature. You can emulate it by::