mirror of
https://github.com/namibia/tips.git
synced 2024-12-23 02:28:58 +00:00
Merge pull request #92 from MarcBT/master
Add tip to delete local and remote tag
This commit is contained in:
commit
115b45ad9b
14
README.md
14
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>
|
||||
@ -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.
|
||||
|
@ -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