Git commands

Revert last commit in local repository

$ git revert HEAD --no-edit

link

Delete commit from history

$ git reset --hard <hash>

link

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

Leave a Reply

Your email address will not be published. Required fields are marked *