git stash blunder: git stash pop and ended up with merge conflicts -


I did a git hiding pop and the merge ended with a collision. I removed the files from the file system and did a git checkout as shown below, but thinks that the files are still unarmed. Then I tried to change the files and try a git checkout and then the same result I tried to force it with the -f flag to appreciate any help Will!

  Chirag-Pattels-MacBook-Pro: Helor Palettel $ git Status App / View / Layout / _choose_patient.html. ARB: App / view / layout / _links need .html.erb: Merge requirements #Change to the branch contract # Changes to commit: # (# git reset HEAD & lt; file & gt; ...) # # Modified: db / schema.rb # # changed but not updated: # ("GIT checkout -  to discard changes in working directory" .. ") # # unearned: app / view / layout / _choose_patient.html.erb # unmerged: app / view / layout / _l Nks.arb chirag-patels-macbook-pro: helor petelcend $ git checkout app / view / layout / _choose_patient.html.erb error: path 'app / ideas / layout / _choose_patient.html.erb' has been unarmed lamp- Patels-MacBook-Pro: Helor Palettel $ git checkout -f App / View / Layout / _choose_patient.html. ARB warning: path 'app / idea / layout / _choose_patient.html.erb' has been unearned  

How to solve Conflict ):

After seeing a conflict, you can do two things:

Do not decide to merge. All you need is cleanliness, to reset the HEAD to reverse the 2 index file. And to clean the tree changes made by 2 and 3 .; Git-reset - Hard can be used for this

Resolve conflicts Geet will mark collisions in work tree. Size the file and edit it in GIT Add it to the index.

>

When the change is not clear, the following happens:

  1. The head pointer remains the same.

  2. MERGE_HEAD referee is set to point to other branch heads

  3. The path that is merged is correct Is updated in the index file and in your work tree.

  4. ...

Therefore: reset git - hard Use if you want to change the hiding place from your work tree, or git reset

below ( option, pop ) you In addition to this:

Applying the state may fail in conflicts; In this case, this hide-out is not removed from the list. You need to solve the conflicts with your hands and later manually call the git stash drop.


Comments