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 trial

Ruby

Commiting left out files

At the end of chapter (Front End) we are told to git commit -m +""

I have the following:

I says to use git add. Do I do those 1 by 1 for those not committed?

Thanks Chris

Rails Environment Configuration.

Changes to be committed:

(use "git reset HEAD <file>..." to unstage)

modified: statuses.js.coffee

Changes not staged for commit:

(use "git add/rm <file>..." to update what will be committed)

(use "git checkout -- <file>..." to discard changes in working directory)

modified: ../stylesheets/application.css

modified: ../stylesheets/scaffolds.css.scss

modified: ../stylesheets/statuses.css.scss

modified: ../../views/layouts/application.html.erb

modified: ../../views/statuses/_form.html.erb

modified: ../../views/statuses/index.html.erb

deleted: ../../views/statuses/index.json.jbuilder

modified: ../../views/statuses/show.html.erb

deleted: ../../views/statuses/show.json.jbuilder

Untracked files:

(use "git add <file>..." to include in what will be committed)

../images/glyphicons-halflings-white.png

../images/glyphicons-halflings.png

bootstrap.js

../stylesheets/bootstrap.css

../../../db/schema.rb

C:\Sites\projects\code\treebook\app\assets\javascripts>

1 Answer

Riley Bracken
Riley Bracken
16,762 Points

For this I would do the following

  1. git add all the files that are untracked git add ../images/glyphicons-halflings-white.png

  2. remove the files that have been deleted git rm ../../views/statuses/index.json.jbuilder

  3. add a to your commit -m (that adds all the modified files) git commit -am "Whatever commit message you would like to use would go here"

  4. Check to see if you have anything that has not been commited git status

  5. Push it up to github git push