6.5 I am stuck please help me


#1


Git workflow 6.4

I do not understand why I cannot add biology.txt, why it does not work.

$ git add biology.txt
fatal: Not a git repository (or any of the parent directories): .git


#2

If you try to sit down, but realize that there's no chair, what would you do?

Perhaps bring a chair to your current location, or perhaps move to a location where there is a chair.

Git is telling you what the problem is about your current location.


#3

what is the location? I have just tried opening biology.txt from science quizzes instead of my quizzes and I am still wrong. I also tried with git checkout master but I have the same message of error.


#4

Ok this worked thank ou very much but

$ git checkout bio-questions
M biology.txt
Already on 'bio-questions'
$ git add biology.txt

I do not understand why I had to go to the bio question branch can you explain me?


#5

Just as in real life you can only be at one job at a time, you can only work on a file (in git) if you are in the same location as the file. Think of each folder as a room & cd is a doorway. To go from room to room you say "cd room-x" (minus the quotes).

Branches work the like folders too. You have to be "in" or on the branch to make work it or make changes to it. You use the command: "git branch branch-I-want-to-go-to" (minus the quotes) to move from branch to branch to branch.


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.