Thursday, 26 July 2012

git まとめ

$git reset --hard HEAD^
:今してしまったpullを取り消す
:--hard ワークディレクトリの内容も書き換える
:HEAD^ 一つ前の状態
:ソース http://tm.root-n.com/unix:command:git:operation:reset_pull


$git fsck
:レポジトリの破損箇所をチェックする
option: --full

$git gc
:レポジトリ内の不要なオブジェクトを削除、最適化を行う




 Trouble Shooting
Problem :
$ git pull origin master
remote: Counting objects: 500, done.
remote: Compressing objects: 100% (452/452), done.
error: pack-objects died of signal 92.87 MiB | 4.25 MiB/s
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: index-pack failed

Solution:
(at remote repository)
%git config pack.windowMemory 10m
%git config pack.packSizeLimit 20m

ref:
http://stackoverflow.com/questions/4826639/repack-of-git-repository-fails

No comments:

Post a Comment