我聽說過關於git的好東西,我想在安裝之前嘗試一下。如果我想在學校使用git,將它放在閃存驅動器上也是非常棒的。是否有可能使用像/path/to/git init
這樣的完整路徑?我可以在不安裝的情況下使用git嗎?
我主要使用Mac OS X,所以這個問題主要針對Mac,但我也想知道它是否可以在其他操作系統上使用。
編輯:
從源代碼作品中編譯。我用下面的命令:
cd git-1.7.5.1 #this is the decompressed dir containing src
make configure
./configure --prefix=/path/to/install/git
make all
sudo make install
這樣做的缺點方法,一旦編譯,該目錄是一個沉重的200MB。 這就是爲什麼我選擇jgit作爲答案。 jgit.sh
小於2MB,支持下列命令:
add Add file contents to the index
branch List, create, or delete branches
checkout Checkout a branch to the working tree
clone Clone a repository into a new directory
commit Record changes to the repository
daemon Export repositories over git://
diff Show diffs
fetch Update remote refs from another repository
init Create an empty git repository
log View commit history
merge Merges two development histories
push Update remote repository from local refs
rm Stop tracking a file
tag Create a tag
version Display the version of jgit
您可以下載jgit.sh
這裏http://www.eclipse.org/jgit/download/
安裝git的心不是那麼多的承諾。即使你不卸載它,我確定你不會注意到它佔用的幾個megs。 – 2011-05-05 04:39:02
@Matt我甚至不確定你是否可以完全卸載它。希望卸載將改變之前的路線。我不喜歡只安裝在同一天卸載。總有一些東西會被拋在後面:/ – styfle 2011-05-05 04:47:04
你可以舉一個卸載後留下的文件的例子嗎? – Blender 2011-05-05 04:48:49