Git

git clone https:// 時の証明書エラー

HTTPS で GitHub から clone しようとしたら証明書のエラーになる。 git clone --depth=1 https://github.com.example.com/repo.git Cloning into 'repo'... fatal: unable to access 'https://github.com.example.com/repo.git/': SSL certificate problem,…

ローカルのmasterのHEADをoriginのHEADにあわせる

Git

普通はrebaseやmerge --ff-onlyなのだがたまに現在のcheckoutしたファイルをそのままにHEADを別のcommit IDに変更したいときがある。 git update-ref [] を使う。 git show-ref --abbrev # bbbbbbb refs/heads/master # aaaaaaa refs/remotes/origin/master …

Gitで実行可能フラグを立てた状態でステージする

git update-index --chmod=+x LOCAL_FILES... msysGitにて。Cygwinでは必要ないからか、割とマイナーで見つけにくい。