Skip to content

Instantly share code, notes, and snippets.

@magnobiet
Last active October 31, 2016 13:22
Show Gist options
  • Save magnobiet/d105aa85ba30cab72a4f to your computer and use it in GitHub Desktop.
Save magnobiet/d105aa85ba30cab72a4f to your computer and use it in GitHub Desktop.

GIT

ssh-keygen -t rsa -b 4096                   # Generating a new SSH key
git checkout --ours                         # Resolv conflict using mine
git checkout --theirs                       # Resolv conflict using theirs

git reset --soft HEAD~1                     # Revert last commit
git log -1 HEAD                             # View last commit

git remote -v                               # View remote address
git remote set-url origin <new-project-url> # Change remove address

git rev-parse --verify HEAD                 # View last hash
git rev-parse --abbrev-ref HEAD             # View current branch

git update-index --assume-unchanged         # Assume files/folder as unchanged
git update-index --no-assume-unchanged      # Revert --assume-unchanged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment