FAQ: Basic Git Workflow - git add

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 (reply) below!

Agree with a comment or answer? Like (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


@thestephenbell Why is there nothing that explains that tho?


@jahnoel exactly!!!

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.

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.

I also problem that .

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.


You can initialize a Git repository using the git init command.

1 Like

touch scene-1.txt
git add scene-1.txt