My favourite git commands

Check in all changes that you made

git add -A
git commit -m “Add your commit info here”
git push

Staging

Before check in you move your changed files from ‘Working Copy Changes’ to ‘Staged Changes’.

  • git add .   This stages all changed files.
  • git add -A   This stages everything (modified or deleted or …).

Revert all changes that you made (that are not pushed / committed)

git checkout .

Revert new files that you have added (changes to the index)

git reset

Revert a committed change

git revert SHA

Guides

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.