Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git pull U, A and D tags: Meaning?

git pull occasionally will give me messages as follows:

screen shot of gitbash during pull attempt

I do not understand the tags of "U", "A", and "D". Can someone please tell me what these mean? Thanks.

like image 656
makansij Avatar asked Feb 23 '15 07:02

makansij


People also ask

What does a git pull do?

The git pull command is used to fetch and download content from a remote repository and immediately update the local repository to match that content. Merging remote upstream changes into your local repository is a common task in Git-based collaboration work flows.

What is git fetch vs pull?

git fetch is the command that tells your local git to retrieve the latest meta-data info from the original (yet doesn't do any file transferring. It's more like just checking to see if there are any changes available). git pull on the other hand does that AND brings (copy) those changes from the remote repository.

What is difference between git fetch and pull and clone?

git fetch is similar to pull but doesn't merge. i.e. it fetches remote updates ( refs and objects ) but your local stays the same (i.e. origin/master gets updated but master stays the same) . git pull pulls down from a remote and instantly merges. git clone clones a repo.

How do I fetch and pull in git?

Git Fetch is the command that tells the local repository that there are changes available in the remote repository without bringing the changes into the local repository. Git Pull on the other hand brings the copy of the remote directory changes into the local repository.


1 Answers

You can see those letters detailed in man git diff-files:

A: addition of a file
D: deletion of a file
U: file is unmerged (you must complete the merge before it can be committed)

Other letters are listed at "What does “T” mean in “git status”?"

C: copy of a file into a new one
D: deletion of a file
M: modification of the contents or mode of a file
R: renaming of a file
T: change in the type of the file
X: "unknown" change type (most probably a bug, please report it)

Regarding the "Pull is not possible because you have unmerged files" error message, it is consistent with the "U" (unmerged files) you see in the output.
See "Why does git say “Pull is not possible because you have unmerged files”?"

To resolve this, you will have to resolve the merge conflicts in question, and add and commit the changes, before you can do a git pull.

like image 118
VonC Avatar answered Oct 10 '22 05:10

VonC