git log -5 --pretty=%s --graph
- delete your local branch:
git branch -d local_branch - fetch the latest remote branch:
git fetch origin remote_branch - rebuild the local branch based on the remote one:
git checkout -b local_branch origin/remote_branch
git reset --soft <HEAD> (HEAD^) – откатить последний коммит
- делаем изменения
git add <file>git commit --amend||git commit --amend -m <new_message>
git fetch <remote> <rbranch>:<lbranch>(remote) – например origingit checkout <lbranch>
git branch -D <branch>
git branch -m <new_name>– переименовать текущую веткуgit branch -m <old_name> <new_name>– переименовать ветку, находясь на любой другой