Git/pull: Difference between revisions

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
link to git fetch
m use template for optional arguments
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''Action''': incorporates changes from a remote repository into the current branch
* '''Action''': incorporates changes from a remote repository into the current branch
* '''Syntax''': <code>git pull {{arg/opt|options}} {{arg|repository}} {{arg/opt|branch}}</code>
 
In its default mode, <code>git pull</code> is shorthand for <code>git {{l/same|fetch}}</code> followed by <code>git {{l/same|merge}} FETCH_HEAD</code>.
 
Sometimes, git pull returns information in a format which does not seem to be documented anywhere, in which it displays a list of files, one file per line, with each file prefixed by a letter. Example:
 
<pre>
M config-libs.php
U menu-data.php
M menu.php
U mw/app-mw.php
A mw/app-specialpage.php
A mw/config-libs-both.php
M mw/config-libs-v1.php
M mw/config-libs-v2.php
U mw/menu.php
A mw/page-section-v3.php
A mw/page-section.php
M widgets/menu-action.php
U widgets/menu-helper.php
</pre>
 
It turns out that '''git {{l/same|status}}''' presents much the same information, but spelled out a little more explicitly, from which it can be determined that the letters indicate the following:
 
* M = modified
* U = both modified
* A = new file


In its default mode, git pull is shorthand for [[../fetch|git fetch]] followed by [[../merge|git merge]] FETCH_HEAD.
==Links==
==Links==
===Documentation===
===Documentation===
* [https://www.kernel.org/pub/software/scm/git/docs/git-pull.html manpage @ kernel.org]
* [https://www.kernel.org/pub/software/scm/git/docs/git-pull.html manpage @ kernel.org]

Latest revision as of 18:34, 11 September 2015

  • Action: incorporates changes from a remote repository into the current branch
  • Syntax: git pull [ <options> ] <repository> [ <branch> ]

In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD.

Sometimes, git pull returns information in a format which does not seem to be documented anywhere, in which it displays a list of files, one file per line, with each file prefixed by a letter. Example:

M	config-libs.php
U	menu-data.php
M	menu.php
U	mw/app-mw.php
A	mw/app-specialpage.php
A	mw/config-libs-both.php
M	mw/config-libs-v1.php
M	mw/config-libs-v2.php
U	mw/menu.php
A	mw/page-section-v3.php
A	mw/page-section.php
M	widgets/menu-action.php
U	widgets/menu-helper.php

It turns out that git status presents much the same information, but spelled out a little more explicitly, from which it can be determined that the letters indicate the following:

  • M = modified
  • U = both modified
  • A = new file

Documentation