Git/pull

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Git
Revision as of 18:11, 11 September 2015 by Woozle (talk | contribs) (syntax)
Jump to navigation Jump to search
  • 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

Links

Documentation