Git status: what is a UU and why should / rm be added to fix it?

Here is the current state of this function branch.

Last steps:

  • Remote development industry diverges
  • Remote Branch Remote Development
  • Hidden local branch with rejection attributes that I want to keep
  • Deferred function branch from the local development branch
  • Element Property Change Messages
  • Stash Apply function branch changes

Results:

$ git status # On branch feature-foo-branch # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: foo/bar.php # modified: foo/baz.php # # Unmerged paths: # (use "git reset HEAD <file>..." to unstage) # (use "git add/rm <file>..." as appropriate to mark resolution) # # both modified: foo/conflict.php # 

and status -s

 $ git status -s UU foo/conflict.php M foo/bar.php M foo/baz/php 

git recommends resolving the add or rm conflict. What does UU mean and why can there be options for fixing it?

All the information I can find about resolving conflicts like this does not use rm , which makes me wonder why git finds this to be appropriate.

I can't find anything about UU in git man pages, but there is this SO question , which also seems to cause problems when sorting add will work in this case.

+6
source share
1 answer

See the git status manual:

In short format, the status of each path is displayed as XY PATH1 → PATH2

For merge conflict paths, X and Y show the modification states of each side of the merge. For paths that do not have merge conflicts, X shows the status of the index, and Y shows the status of the working tree. For unlit paths XY are

U = updated but not loaded

So UU means: unmerged, both modified

I think the add or rm message is a general message for unrelated states, where the state can be unmerged, both deleted , unmerged, deleted by them , etc., and therefore the rm clause. That is why the sentence is as appropriate .

+12
source

Source: https://habr.com/ru/post/901536/


All Articles