Add tip to delete local and remote tag

This commit is contained in:
Marc Beuret 2016-06-17 12:56:27 +02:00
parent d5ca8fabcc
commit 474262b119
2 changed files with 19 additions and 1 deletions

View File

@ -22,6 +22,8 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`.
* [Track upstream branch](#track-upstream-branch)
* [Delete local branch](#delete-local-branch)
* [Delete remote branch](#delete-remote-branch)
* [Delete local tag](#delete-local-tag)
* [Delete remote tag](#delete-remote-tag)
* [Undo local changes with the last content in head](#undo-local-changes-with-the-last-content-in-head)
* [Revert: Undo a commit by creating a new commit](#revert-undo-a-commit-by-creating-a-new-commit)
* [Reset: Discard commits, advised for private branch](#reset-discard-commits-advised-for-private-branch)
@ -225,6 +227,16 @@ __Alternatives:__
git push origin :<remote_branchname>
```
## Delete local tag
```sh
git tag -d <tag-name>
```
## Delete remote tag
```sh
git push origin :refs/tags/<tag-name>
```
## Undo local changes with the last content in head
```sh
git checkout -- <file_name>
@ -628,7 +640,7 @@ git config --global core.ignorecase false
## Add custom editors.
```sh
git config --global core.editor '$EDITOR'
git config --global core.editor '$EDITOR'
```
## Auto correct typos.

View File

@ -52,6 +52,12 @@
"title": "Delete remote branch",
"tip": "git push origin --delete <remote_branchname>",
"alternatives": ["git push origin :<remote_branchname>"]
}, {
"title": "Delete local tag",
"tip": "git tag -d <tag-name>"
}, {
"title": "Delete remote tag",
"tip": "git push origin :refs/tags/<tag-name>"
}, {
"title": "Undo local changes with the last content in head",
"tip": "git checkout -- <file_name>"