Can I use git without installing?

I have heard good things about git and I would like to try it out before installing it. This would also be great to put it on a flash drive if I wanted to use git at school. Is it possible to use the full path like /path/to/git init?

I primarily use Mac OS X so the question is mostly directed for Mac, but I would also like to know if it is possible on other OS's as well.

EDIT:

Compiling from source works. I used the following commands:

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

The downside to this method is that once compiled, the directory is a hefty 200MB. Вот почему я выбрал jgit в качестве ответа. jgit.sh меньше 2 МБ и поддерживает следующие команды:

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 /

13
задан styfle 5 May 2011 в 06:20
поделиться