From fd9ccf25d58daf2b10951d7a0f154545c4e2be30 Mon Sep 17 00:00:00 2001 From: Rahul Date: Fri, 17 Jan 2020 12:51:18 +0530 Subject: [PATCH 1/2] Update git-branch.md To delete a branch already pushed and merged with remote, use `git branch -d $branchname` --- git-branch.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/git-branch.md b/git-branch.md index da3ad10a6..5d07debd9 100644 --- a/git-branch.md +++ b/git-branch.md @@ -50,6 +50,12 @@ git branch -a --merged List outdated branches that have been merged into the current one. +### Delete a local branch +```bash +git branch -d $branchname +``` +Deletes the branch only if the changes have been pushed and merged with remote + ### Delete branch forcefully ```bash From ef74b689ef8375a8989e5a098775c47fe0f51d24 Mon Sep 17 00:00:00 2001 From: "Rico Sta. Cruz" Date: Mon, 20 Jan 2020 16:13:57 +1100 Subject: [PATCH 2/2] Update git-branch.md --- git-branch.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-branch.md b/git-branch.md index 5d07debd9..373ba8664 100644 --- a/git-branch.md +++ b/git-branch.md @@ -51,10 +51,12 @@ git branch -a --merged List outdated branches that have been merged into the current one. ### Delete a local branch + ```bash git branch -d $branchname ``` -Deletes the branch only if the changes have been pushed and merged with remote + +Deletes the branch only if the changes have been pushed and merged with remote. ### Delete branch forcefully