Skip to content

Instantly share code, notes, and snippets.

@realodix
Last active May 30, 2021 22:01
Show Gist options
  • Save realodix/5a907ced8ed5ef30a692013fd3377b0f to your computer and use it in GitHub Desktop.
Save realodix/5a907ced8ed5ef30a692013fd3377b0f to your computer and use it in GitHub Desktop.

Edit Commit

git rebase -i HEAD~N

git push origin HEAD --force

Delete a Git Branch Both Locally and Remotely

// local
git branch -d localBranchName

// remote
git push origin --delete remoteBranchName

// delete branch remotely (shorter command)
git push origin :remoteBranchName

Delete Local and Remote Tags

// local
git tag -d <tag_name>

// remote
git push --delete origin tagname

// jika tag name sama dengan branch name
git push origin :refs/tags/<tag>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment