Skip to content

Instantly share code, notes, and snippets.

@tqwewe
Last active July 16, 2020 07:16
Show Gist options
  • Save tqwewe/1b14828d480f95cd2f46b34718279584 to your computer and use it in GitHub Desktop.
Save tqwewe/1b14828d480f95cd2f46b34718279584 to your computer and use it in GitHub Desktop.
Git Cheatsheet

Create new branch

git checkout -b <branch>

Delete local commits

git reset --hard origin/<branch>

Push without overriding others' changes

git push --force-with-lease

Merge changes from another branch

git pull origin <branch>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment