Error codes · Git
PULSE-GIT-004 Conflict: Same lines modified differently
What does this mean
Git merged two versions of files - yours and the one that arrived - and found places where the same lines were changed differently. Git itself does not decide which version to keep: it has stopped and is waiting for your decision. Nothing is lost - both versions are in the files.
Why does this happen
This happens wherever git merges someone else's changes with its own: when merging branches, when you take changes from a remote branch, when moving a commit (cherry-pick), and when rebasing. In "Details" git names the files:
CONFLICT (content): Merge conflict in … or Automatic merge failed.
What to do
- Click Open Git Screen. At the top there will be a bar of an unfinished operation, for example, “Merging in progress · conflict in 2 files.”
- Open each file with a conflict. Leave the required lines - one of the versions or both together - and remove the label lines
<<<<<<<,=======,>>>>>>>(what they look like is below). - Add the corrected files to the index and commit - you will get a merge commit. When rebasing, instead of committing, continue in the terminal:
git rebase --continue. - If you change your mind, click “Cancel merge...” in the same bar (for transfers and relocations, click “Abort...”). The copy will return to the state before the operation, and what you have already corrected in the files will be lost.
The controversial place in the file is marked by git as follows:
<<<<<<< HEAD
your version
=======
arrived version
>>>>>>> origin/main
In the terminal the same thing: fix the files, then git add <file> and git commit; cancel the merger -
git merge --abort.
When to write to support
Let us know if the Git screen doesn't show a conflict, but git in the terminal says there is one, or vice versa. Click “Send report” in the error card - a report form will open, where the code and details have already been entered, the secrets are hidden in them. Add what operation was performed and click “View and Send”: the window will show exactly what was left - check and click “Submit”. If the cloud is turned off, the button is called “View and save” - send the resulting file to us in any way.