Here are more practical ones(IMHO):
Change the last commit message git commit --amend
git commit --amend
Revert last unpushed commit git reset HEAD~1 --soft
git reset HEAD~1 --soft
Show log one line git log --oneline Press q to exit
git log --oneline
Delete a local branch git branch -d <BRANCH NAME> Ignore push and merge status and force delete: git branch -D <BRANCH NAME>
git branch -d <BRANCH NAME>
git branch -D <BRANCH NAME>
Delete a remote branch git push <REPOSITORY REF> --delete <BRANCH NAME> example: git push origin --delete beta-1.0.0
git push <REPOSITORY REF> --delete <BRANCH NAME>
git push origin --delete beta-1.0.0
If branch ref is equal to a tag ref: git push <REPOSTIORY REF> :refs/heads/<BRANCH NAME> example: git push origin :refs/heads/beta-1.0.0
git push <REPOSTIORY REF> :refs/heads/<BRANCH NAME>
git push origin :refs/heads/beta-1.0.0
And
git log --all --graph --oneline
git status -s
git checkout -b <new-branch-name>
ty!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Here are more practical ones(IMHO):
Change the last commit message
git commit --amend
Revert last unpushed commit
git reset HEAD~1 --soft
Show log one line
git log --oneline
Press q to exit
Delete a local branch
git branch -d <BRANCH NAME>
Ignore push and merge status and force delete:
git branch -D <BRANCH NAME>
Delete a remote branch
git push <REPOSITORY REF> --delete <BRANCH NAME>
example:
git push origin --delete beta-1.0.0
If branch ref is equal to a tag ref:
git push <REPOSTIORY REF> :refs/heads/<BRANCH NAME>
example:
git push origin :refs/heads/beta-1.0.0
And
git log --all --graph --oneline
git status -s
And
git checkout -b <new-branch-name>
ty!