15

git について良いことを聞いたので、インストールする前に試してみたいと思います。学校で git を使用したい場合は、これをフラッシュ ドライブに保存することもできます。のようなフルパスを使用することは可能/path/to/git initですか?

私は主にMac OS Xを使用しているため、質問は主にMac向けですが、他のOSでも可能かどうかも知りたいです。

編集:

ソースからのコンパイルは機能します。次のコマンドを使用しました。

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/

4

2 に答える 2

10

または、JGitを試すこともできます。これは、基本的なGitコマンドを実行できる単一のbashファイルです。Gitはそのbashスクリプトに自己完結しています。

JGitをダウンロードするには、 http: //www.eclipse.org/jgit/download/にある2番目のリンク(自己完結型のコマンドライン実行可能ファイル)を選択し、ダウンロードしたら、名前をjgit.shに変更して、実行しjgit.shますchmod +x jgit.sh

于 2011-05-05T05:13:35.960 に答える
3

ソースからコンパイルして、それをそのフォルダーに入れることはできません--prefix=/path/to/install/folder/make install?

于 2011-05-05T04:43:08.157 に答える