How to push a new local branch to a remote repository

You can push a local created branch to the repository for the first time with

git push origin HEAD

How to remove a local branch

git branch -d branchName

How to delete remote branch

git push origin :banchName

Yes, it is weird and not user friendly.

How to revert commits (uncommit)

Note: this will also remove commits from git. Find the commit you want to be the most recent one and copy its hash by reading the logs:

git log

The hash is something like 6e1cd6739f61746c66eec6580852b920b80a6bc8. Then use reset:

git reset pasteTheHashHere

WikiLinux: Git (last edited 2010-11-09 22:26:12 by CaduSantos)