git

GitHub の設定を手短に

v git

GitHub へのアカウント開設はすでに済んでいるとする. ssh の鍵は既に生成済みとする. Account Settings にて公開鍵を登録する. GitHub 側のユーザ名は常に git なので,手元のローカルユーザ名からのアクセスを可能にするために ~/.ssh/config を編集す…

git の根本

v git

git の SHA-1 名のことを調べていたら git の根本について書いてあったのでまとめておく.簡単のため正確さを犠牲にしているので注意. オブジェクト git のオブジェクトは,(type, length) というヘッダと,データ部分をつなげたバイナリである.このバイナ…

git の SHA-1 名

v git

現在,ある subversion リポジトリを git によって追跡しているが,各コミットに関するベンチマーク値を git 側のコミットの SHA-1 名をキーとして共有ディレクトリに格納している.そこで疑問が生じるわけであるが,別の git svn clone で追跡を開始した gi…

clone の clone から origin への push

v git

オリジナルのレポジトリ repos があるとする. $ cd repos $ git branch * masterこれを clone に clone する. $ cd .. $ git clone repos clone $ cd clone $ git branch * master remotes/origin/HEAD -> origin/master remotes/origin/master $ git chec…

git commit 時に差分を表示する

git commit 時に差分を表示する機能が最近動作しなくなっていた.原因は debian の vim-scripts パッケージの変更であった(Bug #539380).具体的には vim-scripts に入っていた git-commit プラグインが消滅し,代わりに vim-runtime にその機能相当のもの…

git push の警告

v git

git clone したものを単に引数なしで git push すると警告が出る. warning: You did not specify any refspecs to push, and the current remote warning: has not configured any push refspecs. The default action in this warning: case is to push all…