Git Commands list

Add files to VCS and then Commit

git add .

Above command will add all files into vcs.

git commit -m writecommitmessage

Revert all uncommitted changes

Below command will only revert the changes in files. It will not revert newly files added to project.

git reset --hard HEAD

Jump to old commit

The command below will jump your code back to second last commit.

git reset --hard HEAD~1