Skip to content

Instantly share code, notes, and snippets.

@learnit-codeit
Created April 26, 2021 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save learnit-codeit/36644110cc650bff7eadf6c40c5d3519 to your computer and use it in GitHub Desktop.
Save learnit-codeit/36644110cc650bff7eadf6c40c5d3519 to your computer and use it in GitHub Desktop.
#status command is in frequent use when a working with Git and during a merge it will help identify conflicted files.
git status
#Passing the --merge argument to the git log command will produce a log with a list of commits that conflict between the merging branches.
git log --merge
#diff helps find differences between states of a repository/files. This is useful in predicting and preventing merge conflicts.
git diff
#checkout can be used for undoing changes to files, or for changing branches
git checkout
#reset can be used to undo changes to the working directory and staging area.
git reset --mixed
#Executing git merge with the --abort option will exit from the merge process and return the branch to the state before the merge began.
git merge --abort
#Git reset can be used during a merge conflict to reset conflicted files to a know good state
git reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment