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 Git Basics Getting Started With Git Commitment Therapy

adding and commiting git command?


1 Answer

Antonio De Rose
Antonio De Rose
20,884 Points

git init foldername # this is to create a repository git add filename # this is to add a file name git commit # this is to commit the files which have been added into the repository

add and commit, how it varies, is, for you to commit, you need to add first, adding the file, means, that you are keeping the file, outstide of version control, meaning, that no one will be able to see the file, committing means, you are making files committed accessible, to the people whom you want share the files with

good example, is like your own notes maybe kept for yourself, by only adding.