This community-built FAQ covers the “delete branch” exercise from the lesson “Git Branching”.
Paths and Courses
This exercise can be found in the following Codecademy content:
Web Development
Learn Git
FAQs on the exercise delete branch
There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (
) below.
If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.
Join the Discussion. Help a fellow learner on their journey.
Ask or answer a question about this exercise by clicking reply (
) below!
Agree with a comment or answer? Like (
) to up-vote the contribution!
Need broader help or resources? Head here.
Looking for motivation to keep learning? Join our wider discussions.
Learn more about how to use this guide.
Found a bug? Report it!
Have a question about your account or billing? Reach out to our customer support team!
None of the above? Find out where to ask other questions here!
Is there a bug with this excercice ? I tried many option but it won’t validate 
2 Likes
Yes, I tried refreshing many times and it wouldn’t validate my same “git branch -d fencing”
And the worst part is when you Get Solution, it just erases everything and checks out the task… Major bug, come on CodeCademy.
1 Like
Same issue with the “git branch -d fencing”
There was another branch - “checkout”:
$ git branch
checkout
*master
After removing the “checkout”-branch the exercise is completed:
$ git branch -d checkout
1 Like
Seems you still have a branch called “resume.txt”, most likely created by mistake…
While on “master” branch , run :
git branch -d resume.txt
1 Like
ok so um in the code type in git branch, after that you will most likely see another branch… delete the branch that has white text.
Hope this helps!
2 Likes
You should only have one branch: master.
remove the others if any
2 Likes
you have another branch called “new_branch”. delete that too
This resolved my problem. Thanks so much!
I had this problem too and i resolve by using the below syntax
$git branch -d fencing_branch
Deleted branch fencing_branch (was 79a1cc5).
i have deleted all the branch it indicates there is only master but i can’t move ahead
Reset the workplace -->Get stuck → Reset Exercise