学校项目的版本控制?
我希望对我的 CS 项目进行版本控制,以便我可以从多个位置处理它们。我的学校有一个 Linux 实验室,项目完成后我们需要将其放置在那里进行评分。
假设我在 Linux 实验室上有以下结构
~/Work/CS/src/lib
~/Work/CS/src/project1
~/Work/CS/src/project2
~/Work/CS/src/project3
等等......
在处理班级项目时,我将把头文件和档案放入 src/lib,并将源代码放入 src/some_project
最好的方法是什么进行版本控制吗?我想创建一个名为“2011F”的私有 GitHub 存储库,这样我就可以将其他 CS 类的项目放入其中。但最理想的情况是,我希望能够 cd 到 Linux 实验室上的 CS 目录,然后从 GitHub 中提取更新的代码。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我不太确定你想听到什么:-D
只需将整个工作目录添加到 git,在一个地方完成工作时推送,在其他地方开始工作时拉取。
顺便提一句。请注意,如果每个学生的项目都不同,那么将您的作品放在 GitHub 上可能不是最好的主意(实际上会给您带来很多麻烦)。
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).
Unfuddle 提供免费的私人存储库。这也是一个选择。
Unfuddle provides free private repos. That's an option too.
一些建议
虽然 BitBucket 等第三方提供私有 git -repos,但这是迄今为止更好的方式,即 bare-repos、SSH 和 Gitolite:如何托管 Git 存储库并管理我的自己托管内容?
使用子模块:为每个独立项目创建一个 git -repo,为
School2012
创建伞式存储库,然后为每个项目$ git submodule add ball_game
。提醒如何不这样做: Git:如何避免重复提交with sub-sub-sub... Git -repos? 即创建浅层存储库。[即将推出]当我们开始工作时,使用 Ticgit 来监控票证,更多信息此处< /a>.我认为 Redmine 或 Trac 之类的东西是多余的,但无论如何请注意这个概述线程 这里和这张票这里。
Some suggestions
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?
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.[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.