Difference between revisions of "Git/pull"
< Git
Jump to navigation
Jump to search
m (formatting) |
(key for undocumented output format) |
||
Line 2: | Line 2: | ||
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>. | 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] |
Revision as of 23:15, 12 July 2015
Action: incorporates changes from a remote repository into the current 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