Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialChristine Vallestad
2,987 PointsGit status no medals showing
Hi
I do not see the file medals.html in my git when I run the git status command. I only get bronze.html to show after I run the command git status, but the teacher's console shows bronze.html and medals.html.
What am I doing wrong? Thank you.
My Code:
treehouse:~/workspace$ ls
medals
treehouse:~/workspace$ cd medals
treehouse:~/workspace/medals$ ls
bronze.html medals.html
treehouse:~/workspace/medals$ git init
Reinitialized existing Git repository in /home/treehouse/workspace/medals/.git/
treehouse:~/workspace/medals$ ls
bronze.html medals.html
treehouse:~/workspace/medals$ ls -a
. .. bronze.html .git medals.html
treehouse:~/workspace/medals$ git status
On branch master
Untracked files:
(use "git add <file>..." to include in what will be committed)
bronze.html
nothing added to commit but untracked files present (use "git add" to track)
Here is the video lesson First Commits video
1 Answer
Chris Adams
553 PointsHi Christine Vallestad ! This is an interesting one!
Looking at the response logged after you entered git init
, it seems like there was already an existing repository in this directory. When you run git init
for the first time in a directory, you should receive a message similar to the one that you see on Jay's screen: "Initialized empty Git repository in /home/treehouse/workspace/medals/.git/". Instead, yours says Reinitialized
!
If you've already completed the steps later in the sequence (adding the medals.html file, and completing the commit) then you wouldn't see the medals.html file when you enter git status.
I'd recommend that you create a new workspace and try this over again. If your git init
response message says it has been Initialized (as opposed to Reinitialized!) then you'll know you're starting from a clean slate :-)