Skip to content

Instantly share code, notes, and snippets.

@lvalnegri
Last active February 11, 2021 21:11
Show Gist options
  • Save lvalnegri/d859a9dacd8e5a838104d592d6799ad8 to your computer and use it in GitHub Desktop.
Save lvalnegri/d859a9dacd8e5a838104d592d6799ad8 to your computer and use it in GitHub Desktop.
main git commands
# configuring initial parameters
git config --global user.name "name surname"
git config --global usr.email "name@mail.com"
git config --global list
# create
ssh-keygen -t rsa -C "name@mail.com"
git init
git status
git diff
git checkout <branch>
git commit
git commit -m 'message here'
git merge <branch>
git log
git log --oneline
git reset <SHA1>
git reset current~n
git reset -HARD
git revert
git rebase
git reflog
git reset HEAD@{1}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment