Remove commits

git reset --hard HEAD~1

The HEAD~1 means the commit before head.

push时需要加-f强行push

delete branch

delete remote branch

git push origin --delete <your_branch>

delete local branch

git branch -D <branch_name>

set remote url

git remote set-url origin https://github.com/USERNAME/REPOSITORY.git

添加新的url

git remote set-url --add [--push] <name> <newurl>

results matching ""

    No results matching ""