Skip to content

Instantly share code, notes, and snippets.

@yk2kus
Created May 20, 2020 08:34
Show Gist options
  • Save yk2kus/324f38e71e705c6d32c4f1fbe4b088b9 to your computer and use it in GitHub Desktop.
Save yk2kus/324f38e71e705c6d32c4f1fbe4b088b9 to your computer and use it in GitHub Desktop.
git conflicts
To discard local changes on a file, you can do
git checkout yourfile
or, for all files using
git checkout -- .
You can also decide, for each file, if you want to keep your version or the repository version with
git checkout --ours yourfile # Your version
git checkout --theirs yourfile # Repository version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment