Git commands

Revert last commit in local repository

$ git revert HEAD --no-edit


Delete commit from history

$ git reset --hard <hash>


Delete tag

$ git tag -d <tag>

Modify an already existing commit

$ git add <file>
$ git commit --amend -m "modify commit"

Pull changes from a remote repository

$ git fetch

Create bare repos

$ git clone --bare hello hello.git

Submit changes to the remote repository

$ git push shared master