Skip to content

Instantly share code, notes, and snippets.

@tiendatleo
Created May 10, 2022 11:52
Show Gist options
  • Save tiendatleo/3c4d9204a629ad92a0a7b36cde02419d to your computer and use it in GitHub Desktop.
Save tiendatleo/3c4d9204a629ad92a0a7b36cde02419d to your computer and use it in GitHub Desktop.
[Git] Commands for ignoring a file when merge
git merge --no-ff --no-commit <merge-branch>
git reset HEAD myfile.txt
git checkout -- myfile.txt
git commit -m "merged <merge-branch>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment