mirror of
https://github.com/namibia/tips.git
synced 2024-11-05 21:07:53 +00:00
Merge pull request #92 from MarcBT/master
Add tip to delete local and remote tag
This commit is contained in:
commit
115b45ad9b
12
README.md
12
README.md
@ -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>
|
||||
|
@ -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>"
|
||||
|
Loading…
Reference in New Issue
Block a user