Skip to content

Instantly share code, notes, and snippets.

@cetver
Last active March 2, 2022 17:41
Show Gist options
  • Save cetver/5f4468f7ed048f02f19b7448e2b68cb0 to your computer and use it in GitHub Desktop.
Save cetver/5f4468f7ed048f02f19b7448e2b68cb0 to your computer and use it in GitHub Desktop.
Merge conflict in composer.lock
user@host:/project-dir[master]$ git merge --no-ff DEV-999
Auto-merging composer.lock
CONFLICT (content): Merge conflict in composer.lock
Automatic merge failed; fix conflicts and then commit the result.
user@host:/project-dir[master]$ git reset composer.lock
Unstaged changes after reset:
M composer.lock
user@host:/project-dir[master]$ git checkout -- composer.lock
user@host:/project-dir[master]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: composer.json
user@host:/project-dir[master]$ git reset composer.lock
user@host:/project-dir[master]$ composer update vendor/package
user@host:/project-dir[master]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
All conflicts fixed but you are still merging.
(use "git commit" to conclude merge)
Changes to be committed:
modified: composer.json
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: composer.json
modified: composer.lock
user@host:/project-dir[master]$ git diff composer.json
user@host:/project-dir[master]$ git diff HEAD composer.json
user@host:/project-dir[master]$ git add -p
user@host:/project-dir[master]$ git status
user@host:/project-dir[master]$ git commit
user@host:/project-dir[master]$ git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment