Git add <filename.txt>

I’m trying to have git recognize a new file with git add but cant seem to get anywherez
Whaz wrong with this?

git add <scene-1.txt>

Sorry, I did this yesterday and now it won’t show my work! Ugh! I will try to re-loop and get past it. If you pass this one, see if you can help me on my other post for the next step (step 6).

If a remember, git add went like this:

‘’‘git add _<_scene-1.txt>’’’

Yes the command should be git add then you can enter the first letters and press tab to autocomplete.

I could not see the output, where Git indicates the changes to be committed with “new file: scene-1.txt” in green text.

1 Like

Because it doesn’t work

When we see something like this in a syntax key,


It means type the file name with no quotes.

git add scene-1.txt

yeah im having the same problem…

I put like “git stage scene-1.txt”, and it works, but I really didn’t understand so much…
Oh, and the green text saying “new file: scene-1.txt” shows up too…

1 Like

For now, let’s please stay in the confines of the course intro. There is more to come and we only really need to ‘git’ the current proceedings, without extrapolating beyond. Give that time. It would be inappropriate to discuss anything in this thread that has not come up in the lessons, and git stage has not come up yet.

1 Like

If you’re still stuck on 6, type
git diff
to exit diff mode

1 Like

Try this:

git add scene-1.txt

It worked with me.


Hey @wscody, if your question has been answered, take a moment to mark the reply that solved the problem.

don’t use the <> brackets I was stuck on this one for a bit too.
Just type:

git add scene-1.txt

Yep. Worked for me too. I got bash: syntax error near unexpected token `newline’. Removing the angle brackets <…> resolved it. Thanks mtf

I type that in and it says its wrong still

Can you copy/paste what you typed so we can have a better look?

git add scene-1.txt i say that and it says wrong

I have same problem…its says thats wrong

Please show us a screenshot so we can see what you see.

just solve it with git add scene-1.txt