Difference between revisions of "Git/pull"
< Git
		
		
		
		Jump to navigation
		Jump to search
		|  (Created page with "'''Action''': incorporates changes from a remote repository into the current branch  In its default mode, git pull is shorthand for git fetch followed by [[../merge|git merge]...") | m (use template for optional arguments) | ||
| (4 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 | ||
| − | |||
| ==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