forked from firstcontributions/first-contributions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5bcb147
commit 85c7ae8
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
additional-material/git_workflow_scenarios/delete-branch-locally.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#Deleting a locally created Branch | ||
|
||
This will be handy when you accidently misspelled a branch name. | ||
|
||
This can be done in *3* ways | ||
|
||
``` | ||
git branch -D <branch_name> | ||
``` | ||
|
||
``` | ||
git branch --delete --force <branch_name> # Same as -D | ||
``` | ||
|
||
``` | ||
git branch --delete <branch_name> # Error on unmerge | ||
``` | ||
|
||
-D stands for --delete --force which will delete the branch even it's not merged (force delete), but you can also use -d which stands for --delete which throw an error respective of the branch merge status... |