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

Development Tools Git Basics Getting Started With Git Committing Changes

[Running XCode on Yosemite] Git commit command for test file not functioning

Following along w/ the tutorial but got stumped when attempting to commit test "README" file.

Code below:

Margarets-MacBook-Pro:~ margaretjames$ ls -a
.            .cups            Library
..            .git            Movies
.CFUserTextEncoding    .gitconfig        Music
.DS_Store        .ssh            Pictures
.Trash            Desktop            Public
.bash_history        Documents        may_project
.config            Downloads        my_first_repository
Margarets-MacBook-Pro:~ margaretjames$ cd may_project
Margarets-MacBook-Pro:may_project margaretjames$ ls -a
.    ..    .git    README
Margarets-MacBook-Pro:may_project margaretjames$ git commit
On branch master

Initial commit

Untracked files:
    README

nothing added to commit but untracked files present

Any ideas?

1 Answer

Chris Shaw
Chris Shaw
26,676 Points

Hi Margaret,

Before you can commit to your local repository you first need to add your README file to the staging area, you can do this by using the git add command.

git add README

Hope that helps.