6 cannot solve question 2


#1

$ git branch bio-questions
fatal: A branch named 'bio-questions' already exists


#2

Weird, did you spell bio-questions correctly?

I suggest deleting the branch:

git branch -d bio-questions

and then creating it again


#3

If you want to change to that branch, use checkout
(I have no clue what your intentions are aside from the command that you wrote)


#4

I looked up the exercise, the instructions for step 2 are:
Create a branch called bio-questions


#7

branch can not be deleted I receive error
When I create a branch:
git branch bio-questions
I receive:
fatal: A branch named 'bio-questions' already exists
however exercise does not complete and I receive error :
Did you create a new branch called "bio-questions"?


#8

I'm guessing the error isn't just a big red flag, but that it actually tells you something, likely something that you can act on.


#9

I JUST NEED TO COMPLETE EXERCISE 2
AND IT DOES NOT WORK
When I create a branch:
git branch bio-questions
I receive:
fatal: A branch named 'bio-questions' already exists
however exercise does not complete and I receive error :
Did you create a new branch called "bio-questions"?


#10

Dunno, completion seems secondary to solving the problem, learning to solve problems.

If you need to create a branch, and it's not letting you because it exists, then you need to delete it.
Stop trying to do what it is clearly not allowing, and fix what it is saying prevents it from doing what you want.


#11

I CAN NOT DELETE THE BRANCH I RECEIVED ERROR WHEN I TRYING DO DELETE
git branch -d bio-questions

it saying cannot delete a branch which you are currently on


#12

And what was my response last time you said this?

Well if you're on it, then stop being on it.
You know, or keep telling us in all-caps that you have some sort of error because that really gets you somewhere.

Just follow what the error messages are telling you needs to change, that's all anyone ever does.


#13

what the solution?
the problem still unsolved:
exercise 2 new branch cannot be added or deleted


#14

The solution is to read the error and change what it is saying is preventing it from doing what you're asking it to do.

It'll do you no good at all to just copy a command if you can't produce that command yourself.


#15

i post error with explanations for you to read and expaline but do not receive correct answer :slightly_smiling: you just saying read and follow errors :slightly_smiling: that everyone can tell:)


#16

You sure about that? Because I said what you should be doing in response to the latest error 13 minutes ago.


#17

you said a lot of thing which did not help
problem still unsolved
can you tell exact command which resolve the issue?


#18

change branch, and then delete it, and then re-create it.


#19

I asked about the exact commands not steps, I already complete steps above


#20

Hi @sahaj108, you can't delete a branch if you are still on it. Were you able to change branches?


#21

Thank you guys for help, will try more from scratch step by step


#22

Just holler if you need a nudge.