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

C#

Borislav Yordanov
Borislav Yordanov
4,800 Points

How to upload ready project in github?

I am using visual stuido 2015 and I would like to upload a project which i already have done. I have watched here in Treehouse how to create new repository then project and that's great. I have done it, but now with a project which i already created I have difficulties.

Please advise

3 Answers

jason chan
jason chan
31,009 Points

https://teamtreehouse.com/library/using-github-with-visual-studio

For terminal is navigate to directory.

git init
git add .
git commit -m "randome notes"
git remote add origin https://github.com/username/githubRepositoryName.git
git push -u origin master

refresh repository webpage

Jill Hayhurst
seal-mask
.a{fill-rule:evenodd;}techdegree
Jill Hayhurst
Front End Web Development Techdegree Student 4,607 Points

This does not exist in Visual Studio Code for me: 2) File > Add to source control There is no way to show screenshots, but I'm pretty certain that it's not there.

James Churchill
STAFF
James Churchill
Treehouse Teacher

Borislav,

Jason's solution is spot on, but you can also publish a project to GitHub using Visual Studio.

1) Open your project in Visual Studio.

2) File > Add to source control

3) Open Team Explorer, click on Home button, proceed to "Sync" and there you'll find the "Publish to GitHub". Click on "Get Started".

4) Type title of your repository and description (optionally)

5) Click on "Publish"

That'll create a new a repo. If you're repo already exists, you could give this a try.

1) Clone the repo using Visual Studio

2) Using Windows File Explorer, find your existing Visual Studio Project (or Solution if your Project is part of a Solution) and move that Project (or Solution) into the repo's local folder. Make sure that your Project (or Solution) isn't open in Visual Studio when you copy or move it.

3) Now you can open your Project (or Solution) from the new location

4) Commit and push your changes to GitHub

Thanks, James