git init
git add --all
git commit --author "Kyle <Kyle@MAIL.COM>"
git log
git show COMMIT-ID
git show-branch --more=10 --pretty=fuller
git diff COMMIT-ID-0 COMMIT-ID-1
git rm
git mv
git clone --bare --origin BRANCH_NAME SOURCE DEST
git config user.name Kyle
git config user.email Kyle@MAIL.COM
.git/config, --file, default
~/.gitconfig, --global
/etc/gitconfig, --system
Object Store: Blob, Tree, Commit, Tag
Index: Private & Local
git cat-file -p SHA1-ID
git rev-parse SHA1-ID-PREFIX
git ls-files -s
git write-tree
git commit-tree
git daemon --verbose --base-path=`pwd` --export-all --enable=receive-pack --enable=upload-pack --enable=upload-archive --listen=localhost `pwd`/XXX.git
git daemon --verbose --base-path=%CD:\=/% --export-all --enable=receive-pack --enable=upload-pack --enable=upload-archive --listen=localhost %CD:\=/%/XXX.git
使用msysgit时,命令如push, pull, clone时常会出现错误或者停滞假死的问题。作为初级用户,着实折腾了一会。
plink -L 9418:localhost:9418 -P 9100 -N -agent username@host
git remote add origin git://localhost/XXX.git
把公用的bare repository放到Linux机器上边,本地push到那台机器。
git archive --format=zip -0 -o out.zip HEAD
ls -lsa
diff -r DIR-0 DIR-1