Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Sourcetree how to delete local branch

As in question.

When delete local branch, it show error 


git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks branch -d feat/cn/KT3TCT6-6555_import_ma_khach_hang
warning: not deleting branch 'feat/cn/KT3TCT6-6555_import_ma_khach_hang' that is not yet merged to
'refs/remotes/origin/feat/cn/KT3TCT6-6555_import_ma_khach_hang', even though it is merged to HEAD.
error: The branch 'feat/cn/KT3TCT6-6555_import_ma_khach_hang' is not fully merged.
If you are sure you want to delete it, run 'git branch -D feat/cn/KT3TCT6-6555_import_ma_khach_hang'.


When I run git bash 'git branch -D feat/cn/KT3TCT6-6555_import_ma_khach_hang'

It show error 


fatal: not a git repository (or any of the parent directories): .git



So how to delete a local branch? 

Why should someone care about a branch that he want to delete is fully merged or not?

1 answer

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Dec 18, 2018


Seems like the real issue is on the second part:

fatal: not a git repository (or any of the parent directories): .git

Have you navigated to the directory in a command shell and run "git status" there? It might be that the .git folder has become corrupted.

Let us know!


Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events