2009年9月16日 星期三

git

git: 分散式的subversion

下載git:
windows version:
http://code.google.com/p/msysgit/downloads/list
linux version:
http://git-scm.com/download

安裝git:
在windows,首先需安裝Cygwin,再安裝git。

新增git repository:
首先在程式集點選Git Bash,假設以C:/GitStuff/當repository,先進入C:/GitStuff/,然後下指令git init。此時資料夾內會出現.git的隱藏資料夾。

新增檔案:
首先新增一個檔案,指令為:touch test.txt。先add 此檔案,指令為:git add test.txt。再commit上去,指令:git commit -m "Commit Test"。

看log檔案:
若要看所有的log,可下指令:git log -a。

沒有留言:

張貼留言