mirror of
https://github.com/k88hudson/git-flight-rules.git
synced 2025-03-10 12:48:43 -03:00
Added explanation for deleting a branch
This commit is contained in:
parent
4622e309f1
commit
1798a7d4c0
22
README.md
22
README.md
@ -53,6 +53,7 @@ For clarity's sake all examples in this document use a customized bash prompt in
|
|||||||
- [Delete/remove last pushed commit](#deleteremove-last-pushed-commit)
|
- [Delete/remove last pushed commit](#deleteremove-last-pushed-commit)
|
||||||
- [Delete/remove last local commit](#deleteremove-last-local-commit)
|
- [Delete/remove last local commit](#deleteremove-last-local-commit)
|
||||||
- [Delete/remove arbitrary commit](#deleteremove-arbitrary-commit)
|
- [Delete/remove arbitrary commit](#deleteremove-arbitrary-commit)
|
||||||
|
- [I want to delete a branch](#i-want-to-delete-a-branch)
|
||||||
- [Delete tag](#delete-tag)
|
- [Delete tag](#delete-tag)
|
||||||
- [Deleted Patch](#deleted-patch)
|
- [Deleted Patch](#deleted-patch)
|
||||||
- [Check if all commits on a branch are merged](#check-if-all-commits-on-a-branch-are-merged)
|
- [Check if all commits on a branch are merged](#check-if-all-commits-on-a-branch-are-merged)
|
||||||
@ -677,6 +678,27 @@ git rebase --onto SHA1_OF_BAD_COMMIT^ SHA1_OF_BAD_COMMIT
|
|||||||
git push -f [remote] [branch]
|
git push -f [remote] [branch]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
<a name="i-want-to-delete-a-branch"></a>
|
||||||
|
### I want to delete a branch
|
||||||
|
|
||||||
|
To delete a remote branch:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
(master)$ git push origin --delete my-branch
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also do:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
(master)$ git push origin :my-branch
|
||||||
|
```
|
||||||
|
|
||||||
|
To delete a local branch:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
(master)$ git branch -D my-branch
|
||||||
|
```
|
||||||
|
|
||||||
<a name="delete-tag"></a>
|
<a name="delete-tag"></a>
|
||||||
### Delete tag
|
### Delete tag
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user