sty*_*fle 13 git portable-applications
我听说过关于git的好东西,我想在安装之前尝试一下.如果我想在学校使用git,将它放在闪存驱动器上也很棒.是否可以使用完整的路径/path/to/git init?
我主要使用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
Run Code Online (Sandbox Code Playgroud)
这种方法的缺点是,一旦编译,目录是一个沉重的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
Run Code Online (Sandbox Code Playgroud)
你可以jgit.sh在这里下载http://www.eclipse.org/jgit/download/
或者您可以试用JGit,它是一个单独的bash文件,您可以运行基本的Git命令.Git是自包含在该bash脚本中的.
要下载JGit,请选择下载后的第二个链接(自包含命令行可执行文件)http://www.eclipse.org/jgit/download/,将其重命名为jgit.sh并运行它:( jgit.sh记得chmod +x jgit.sh)
| 归档时间: |
|
| 查看次数: |
7483 次 |
| 最近记录: |