Why am I unable to 'git add' a file?

Hey, it still doesn’t work for me. I checked the directory and the git init, but it still doesn’t work. I restarted it and refreshed it many times with the same result. can somebody help me?

1 Like

The same! Stuck there. Now it works!:))

it still did not work for me :frowning:

Same hier!
Please help!

I managed to make it work now!
@paulbangle1519982234 did you managed to solve it?
I just did…
I refreshed the page once again and then I did the following:
git init /home/ccuser/workspace/sorcerers-code/.git/ Reinitialized existing Git repository in /home/ccuser/workspace/sorcerers-code/.git/.g it/ ls
add_test.rb init_test.rb scene-1.txt
$ git cd scene-1.txt
git: ‘cd’ is not a git command. See ‘git --help’.

Did you mean this?
add
$ git add scene-1.txt

it worked! :smiley:

3 Likes

Thank you so much! This helped me a lot

What I did: I reseted my progress in this lesson and started it again from 0.

1 Like

Super! Merci beaucoup pour votre aide. Cela fonctionne.

could you please tell me what is wrong?
it should be ok, but not

hi!
is anybody there?
I’m stacked on this Git lesson, no logic, no help, no solution to check what I’m doing wrong.
I post question on forum, but no reply either.

Could someone please help me with this issue?
Technical Support told that can not help me with it…
I refreshed the page
I started from the beginning
I tried to use solutions offered here
it does not work

First, reset the workspace, then try the following:

cd /home/ccuser/workspace/sorcerers-code
git init
git add scene-1.txt
git status
4 Likes

Thank you, it worked .

1 Like

thanks for saying directly what to do, it works now

Hi there.

If you’re having trouble, please check that the files are where you expect them to be. From the sorcerers-code directory, if you type ls into bash and hit enter, you should see the scene-1.txt file listed in the output. If it’s not there, you may need to reset the exercise. :slight_smile:

2 Likes

Awesome thank you! I was stuck on that all day!

2 Likes

I have tried so many time with
“git add scene-1.txt”, “touch scene-1.txt”
and also tried “git init” and repeated all the steps again. They didn’t work.
Finally, it says maybe you want to try “git add .
And it worked! How?

The “.” at the end of “get add .” means everything. So you’ll add everything to the staging area when you enter “get add .”

A post was split to a new topic: Don’t understand this git status output