This community-built FAQ covers the “git add” exercise from the lesson “Basic Git Workflow”.
Paths and Courses
This exercise can be found in the following Codecademy content:
Web Development Computer Science
Learn Git
FAQs on the exercise git add
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 !
I wasn’t able to get the solution.
I wrote:
git add scene-1.txt
but it didn’t get through. What did i miss here?
I am having the same issue.
The answer clearly seems to be:
git add scene-1.txt
But I am still getting an error. When I click to auto-solve the exercise, it does not explain anything. Is this a bug?
First, you must type:
git init
Then you can type:
git add scene-1.txt
4 Likes
@thestephenbell Why is there nothing that explains that tho?
3 Likes
Type git status to see the status of the file. Then if need to do a git init. Then you can type
git add filename
Shortcut. Type git add sc and then press TAB and it will autocomplete the typing of that filename for you. TAB will autocomplete the filename if enough characters are there to uniquely match the filename you are trying to autocomplete.
1 Like
What are those .rb files that were getting created along the way.
I know this isn’t codecademy’s fault, but why in the world is this tool so widely used? Surely there’s a better way to save and share different versions of projects than by typing everything into a command line like this.
jampatt
February 5, 2021, 3:01am
11
it is still error. Also I don’t see any autocomplete solu
Welcome to the forums!
First, you need to initialize a Git repository. Then, use the git add
command with the file scene-1.txt
.
Hint
You can initialize a Git repository using the git init
command.
2 Likes
touch scene-1.txt
git add scene-1.txt
It works for me, same solution
1 Like
Same here, it works.
I entered git init, touch scene-1.txt, git add scene-1.txt
1 Like
I was having the same issue, entries into the command line correct but still not adding, etc. Realised it was because I wasn’t saving the changes.
Make sure you are clicking save in the middle pain when you are making the additions to the scene-1.txt file before then adding, committing, etc.
me too!!! i can’t figure it put
oh i got it!
its git add scene-1.txt and it works
it works like this:
git add scene-1.txt
Great comment. Always good to check what we have or status. Especialy good comment if one took a break between excercises.