144 $ git branch -r |
144 $ git branch -r |
145 |
145 |
146 List all remote branches (from all remotes):: |
146 List all remote branches (from all remotes):: |
147 |
147 |
148 $ git ls-remote |
148 $ git ls-remote |
|
149 $ git ls-remote origin |
|
150 |
|
151 List registered remotes:: |
|
152 |
|
153 $ git remote show |
149 |
154 |
150 List remote branches from ``$REMOTE`` remote:: |
155 List remote branches from ``$REMOTE`` remote:: |
151 |
156 |
152 $ git ls-remote --heads $REMOTE |
157 $ git ls-remote --heads $REMOTE |
153 $ git remote show $REMOTE |
158 $ git remote show $REMOTE |
154 |
159 |
|
160 Special case of above is ``origin`` remote, which is default remote:: |
|
161 |
|
162 $ git remote show origin |
|
163 $ git ls-remote --heads origin |
|
164 |
155 .. note:: |
165 .. note:: |
156 |
166 |
157 Look to ``[remote "..."]`` in ``~/.git/config`` to find out names of possible |
167 Look to ``[remote "..."]`` in ``~/.git/config`` to find out names of possible |
158 remotes. Alternatively get list from:: |
168 remotes. Alternatively get list from:: |
159 |
169 |
160 $ git remote show |
170 $ git remote show |
161 |
171 |
162 Getting branches pointers from default (``origin``) remote:: |
172 Getting branches pointers from default (``origin``) remote (without merging |
|
173 tracking branch):: |
163 |
174 |
164 $ git fetch |
175 $ git fetch |
165 |
176 |
166 Getting branches pointers from ``$REMOTE`` remote:: |
177 Getting branches pointers from ``$REMOTE`` remote:: |
167 |
178 |
168 $ git fetch $REMOTE |
179 $ git fetch $REMOTE |
|
180 |
|
181 To get updated with default remote changes:: |
|
182 |
|
183 $ git pull |
|
184 |
|
185 or specify concrete remote:: |
|
186 |
|
187 $ git pull $REMOTE |
|
188 $ git pull origin |
|
189 |
|
190 To locally remove pointers to deleted remotely branches:: |
|
191 |
|
192 $ git remote update --prune |
|
193 $ git remote update --prune origin |
169 |
194 |
170 .. note:: |
195 .. note:: |
171 |
196 |
172 Only curtain branches fetched by default:: |
197 Only curtain branches fetched by default:: |
173 |
198 |