Creating a git repo for my projects workspace

Soldato
Joined
3 Apr 2003
Posts
2,928
Hey guys,

I took some advice here the other week and signed up for github as i would like to share my programs between desktop and laptop for uni.

I have only just got around to actually messing with this and have done git real course on codeschool. The problem is that although it has told me all sorts of commands and things it doesnt actually cover the basic of basic which is how to backup a folder i already have.

Essentially i have my workspace folder that contains my eclipse and visual studio programs. I literally want that to be what is backed up on git and shared across the computers.

i made a repo on github and did a pull but that just creates a new folder on my computer or in my workspace.

Could anyone help me out with the steps i need to take to make a repo for my actual workspace folder so that i can just share this folder between the 2 computers? Cheers
 
Soldato
Joined
19 Dec 2009
Posts
2,669
Location
Lancashire
Should be really simple (if I remember correctly, anyway!). Just do:

Code:
git remote add origin $repo

Where $repo is the address for your repository on GitHub. Then just add files, commit and push:

Code:
git add .
git commit -m 'whatever'
git push origin master
 
Soldato
OP
Joined
3 Apr 2003
Posts
2,928
Don't put different projects in one git repo, use a separate repo for each one.

AH, i figured just backup the whole folder due to only getting 5 private repos with github but i suppose i wont actually be working on more than 5 at a time so could just do individual and then put finished program on dropbox for storage.
 
Back
Top Bottom