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 help

i am able to commit but unable to see my repo on github website.

MyThReYas-MacBook-Pro:~ MyThReYa$ mkdir serraproj
MyThReYas-MacBook-Pro:~ MyThReYa$ cd seeraproj/
-bash: cd: seeraproj/: No such file or directory
MyThReYas-MacBook-Pro:~ MyThReYa$ cd serraproj
MyThReYas-MacBook-Pro:serraproj MyThReYa$ git init
Initialized empty Git repository in /Users/MyThReYa/serraproj/.git/
MyThReYas-MacBook-Pro:serraproj MyThReYa$ ls
MyThReYas-MacBook-Pro:serraproj MyThReYa$ ls -a
.   ..  .git
MyThReYas-MacBook-Pro:serraproj MyThReYa$ ls
index.html
MyThReYas-MacBook-Pro:serraproj MyThReYa$ git add index.html
MyThReYas-MacBook-Pro:serraproj MyThReYa$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
#   new file:   index.html
#
MyThReYas-MacBook-Pro:serraproj MyThReYa$ git commit -m"this is a try"
[master (root-commit) 4acb983] this is a try
 1 file changed, 87 insertions(+)
 create mode 100644 index.html
MyThReYas-MacBook-Pro:serraproj MyThReYa$ git status
# On branch master
nothing to commit, working directory clean
MyThReYas-MacBook-Pro:serraproj MyThReYa$ git status

1 Answer

Commiting only stores the changes on the local machine, in order to send the data to github you need to use: $ git push

If the push fails then you haven't created and cloned the repository correctly. In order to do it correctly you first need to create a new repository on github, and then clone the repository to your computer. After this you make changes and Commit and then Push the changes to github.