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

Andre Lacerda
9,455 PointsHow to sync Workspaces with Github
Hello Everyone,
I am trying to sync my Workspaces with Github but it is not working. I have created a project a commited to Github. Later I have made changes to the HTML and I tried to sync the changes but it is not working. I had to create a new repository.
I watched the Github workshop and I noticed that the teacher's Workspace was synced to to the Githib account. How do I do that so I can record changes without creating new repository.
Thanks
4 Answers

Kevin Korte
28,147 PointsWas the github repo already in existence before the workspace?

Andre Lacerda
9,455 PointsNo. I am a Techdegree student and I was following along the Project 1 for the Front End Development Track. I created my Github account and loaded the first draft of project 1. A few days later, I made some changes to the HTML and CSS and wanted to load the changes but I could not sync to the same repository. I ended up creating two repositories. I named the second Project 1 V2.
But for future reference I want to make sure that I can sync the changes directly to the same repository.
Any suggestions?

Nathan Williams
Python Web Development Techdegree Student 6,851 Pointssomething like this in workspaces terminal should work for an existing github repo:
git init
git add .
git commit -m 'initial commit'
git remote add origin https://github.com/me/my-repo.git
git push -u origin master

Andre Lacerda
9,455 PointsThanks Nathan,
I will give this a try later tonight.