git reset --soft HEAD~1
-
Reset will rewind your current HEAD branch to the specified revision.
-
Effectively making our last commit undone.
-
The --soft flag: ensures undone revisions are preserved.
git reset --hard HEAD~1
-
If you don't want to keep these changes
$ git reset --hard XXXXDDGDGDG
- undoes all commits that came after the one you returned to here XXXXDDGDGDG
git branch | grep -v "master" | xargs git branch -D
alias gbr="git branch | grep -v "master" | xargs git branch -D"
git branch -d the_local_branch
git push origin :the_remote_branch
git remote add origin <remote_repo_url>
git push --all origin
git push --all --set-upstream origin
git rebase -i origin/development~<index-of-required-commit-range>
git push origin +development