강좌 & 팁
리눅스에서 에디터뿐만이 아니라, 버전 컨트롤 소프트웨어의 사용도 거의
필수라고 할 수 있겠지요. 한국에서 anygate라는 인터넷 공유기를 만들때는
cvs 라는 놈을 사용했었는데요. 현재는 subversion 과 git 시스템을 많이 사용
하는 것 같습니다.
저는 git을 사용하고 있습니다. 이유는 단지 저의 무인자동차 프로젝트에서
사용하고 있기때문에 그냥 따라서 사용하고 있습니다. 전혀 git 전문가가
아니라는 것이지요. 저의 지도교수가 알려준 간단한 명령어들을 소개할까
합니다. 실제로 저는 이 정도의 커맨드만을 사용하고 있습니다.
[0]introduction
You're going to need to learn how to create your own git repositories,
Hyunggi, so please take this as an opportunity to learn. I'll help you
by sending you some good tutorial and documentation links for the
version control software:
Tutorial:
http://www.kernel.org/pub/software/scm/git/docs/everyday.html
http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html
http://git.or.cz/course/svn.html
Docs:
http://git.or.cz/gitwiki/GitDocumentation
http://git-scm.com/documentation
Remember, using version control does not remove the need for
communication between developers. In fact, it increases the need for
it! It's very important when sharing a project to let the other users
know when something has been pushed in so that they can expect it and be
ready to accept the changes and merge it with their own.
[1]how to initialize
$ tar zxf frotz.tar.gz
$ cd frotz
$ git init
$ git add .
$ git commit -m "import of frotz source tree."
$ git tag v2.43
[2]how to clone
git clone ssh://hyunggic@linux.gp.cs.cmu.edu/afs/cs.cmu.edu/project/adcrl/hyunggi_cho/repository/iv2010 iv2010
[3]some useful command
1) You log into a machine to do some work on your code.
2) You go into your directory and do "git pull" to make sure the local code is up to date.
3) You edit your code.
4) When you're done, do "git status" to see what has changed.
Make sure to do "git add" on every single file that you've changed or added.
5) Commit with "git commit" and then push with "git push" to make it available on the AFS repository.
[3]more useful command
http://git.or.cz/course/svn.html
If you want to add a file to the repository:
git add <filename>
If you want to remove a file from the repository:
git rm <filename>
If you want to move a file in the repository
git mv <filename>
If you've edited your work and you want to commit it, you need to 'add' any changed files to the set of files to be committed:
git add <filename>
If you want to know what files you've edited and what files you don't know anything about, you can do:
git status
Once you're ready to commit, do:
git commit
This will pop up an editor where you can type your commit statements.
When you close the editor, it should then be committed to your _LOCAL_
repository. Now you need to share it with the global repository, so you can do:
git push
and it will push it up to the AFS space.
If you ever want to pull changes from the AFS space, then do:
git pull
이상 간단한 git 사용법 이었습니다.