2

I'm looking to version control my CS Projects so I can work on them from multiple locations. My school has a Linux lab, where we are required to place our projects once they're completed for grading.

So let's say I have the following structure on the Linux Lab

~/Work/CS/src/lib
~/Work/CS/src/project1
~/Work/CS/src/project2
~/Work/CS/src/project3

And so on...

When working on a class project, I will be placing header files and archives into src/lib, and source code into src/some_project

What's the best way to go about version controlling this? I want to make a private GitHub repository called "2011F" so I can put projects from other CS classes in there. But optimally, I would like to be able to cd into my CS directory on the Linux lab, then pull updated code from GitHub.

Jordan Scales
  • 2,687
  • 4
  • 28
  • 37
  • `github != git` Bitbucket offers free Git -repos, Github not. You can also host your own git -repos in your school server -- notice this thread [here](http://stackoverflow.com/questions/11007679/how-can-i-host-git-repositories-and-manage-my-content-hosting-myself) about content-hosting your git-repos. – hhh Jun 28 '12 at 21:59

3 Answers3

2

I'm not really sure what you want to hear :-D

Just add the entire Work directory to git, push when done with work in one place, pull when starting work somewhere else.

Btw. note that if the project aren't different for each student, putting your work on GitHub might not be the brightest idea (actually can get you into a lot of trouble).

Šimon Tóth
  • 35,456
  • 20
  • 106
  • 151
  • He did say a _private_ repo on GitHub. – Karl Bielefeldt Sep 09 '11 at 15:28
  • @Let_Me_Be, yes this is a private repo on my Student GitHub account :) But I appreciate your concern. And looking back on my question, I'm not sure why I had issue understanding this concept. Maybe I was asking how to clone particular directories instead of an entire repo, but I don't actually need to do that. – Jordan Scales Sep 09 '11 at 18:20
  • Did not know GitHub did free private repos for students. Makes me like them even more. – Karl Bielefeldt Sep 10 '11 at 23:15
0

Some suggestions

  1. Although third-parties such as BitBucket offers private git -repos, this is by far better way i.e. bare-repos, SSH and Gitolite: How can I host Git repositories and manage my content-hosting myself?

  2. Use submodules: create a git -repo for each independent project, create umbrella repo for School2012 and then for each project $ git submodule add ball_game. Alert how not to do it: Git: how to avoid repetitive committing with sub-sub-sub... Git -repos? i.e. create shallow repos.

  3. [Coming] Use Ticgit to monitor tickets when we get it working, more here. I think things such as Redmine or Trac are an overkill but anyway notice this outlining thread here and this ticket here.

Community
  • 1
  • 1
hhh
  • 50,788
  • 62
  • 179
  • 282
0

Unfuddle provides free private repos. That's an option too.

Adam Dymitruk
  • 124,556
  • 26
  • 146
  • 141