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!

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 trial

Development Tools Introduction to Git First Commits First Commits

Victor Stanciu
Victor Stanciu
Full Stack JavaScript Techdegree Student 11,196 Points

SOLVED: I removed bronze.html and now it doesn't show when running `git status`

I staged bronze.html, and in trying to unstage it, I completely removed it from the working tree and from the index. My history of commands is this:

$git init

$git add bronze.html

$git status

$git rm -f bronze.html

$git status

After running the second $git status command, bronze.html was completely removed from the Untracked files list. Also, clicking the file in the sidebar returns an error message saying that the file was removed, or something like that.

I deleted the workspace and created a new one, and now I can access the file from the sidebar, but it is still missing from the Untracked files

Is there anything I can do to revert these changes?

1 Answer