FAQ: How to Backtrack - more git add

This community-built FAQ covers the “more git add” exercise from the lesson “How to Backtrack”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn Git

FAQs on the exercise more 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!

Hi,
I am very new with git bash and maybe I do not understand anything…
In this lesson we have to change all “LARRY” to “LAERTES”.
I tried to use the following command in the bash command line as we learned at the previous lessons:
sed "s/LARRY/LAERTES/g" scene-3.txt scene-7.txt

When I run this command I see everything been changed as I expected.
Ones again I check the files output with the command:
cat scene-3.txt and the output is still the unchanged version…
Maybe need more override the file with a pipe command?

PS: I found the solutions. I forget to use the -i flag. Without this flag the files did not changed. After changing need to close the edited files and open again…

1 Like

I was having an issue with this lesson. I used sed -i ‘s/LARRY/LAERTES/g’ scene-3.txt scene-7.txt to make changes to scene-3.txt and scene-7.txt but receiving an error message. ThenI tried git status and noticed from the previous lesson that scene-5.txt was still present. So I used git add . for scene-5.txt, scene-3.txt and scene-7.txt and then I was able to advance in this project - the git commands for the FullStack course. Perhaps I had made a mistake in scene 5 that wasn’t flagged and then posed a problem later. Either way it was a little frustrating but I was able to trouble shoot, find my problem and move on.

1 Like