2013年11月5日 星期二

看某一個 commit 的 diff

只要看某一個 commit 的 diff,就用
$ git show 2e6f1155dd56512d5f848f4b7e6198c38aa256f2

2013年8月12日 星期一

git with https source.. SSL error

最近越來越多 git source 採用 https,

有兩個麻煩的地方:
  • username, password
  • SSL certification
usename, password 就用 ~/.netrc 就可以,
把 machine, login, password 寫進去:
machine my.git.com
login checko
password mygitpassword
.. 對,是明文 ..

site SSL certification fail 就會出現...
Initialized empty Git repository in /xxxx/xxxx/.git/
Password: 
error: server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt 
CRLfile: none while accessing https://xxxx@xxxx.xxxx/xxxx/xxxx.git/info/refs

fatal: HTTP request failed
這時候就加上這個還就可以:
export GIT_SSL_NO_VERIFY=1


2013年7月22日 星期一

git difftool readonly

某一天突然 run git difftool 變成以 readonly 開啟。
把另一個系統的 git (1.7.5) copy 到 local 的 ~/bin/ 下,結果一樣。

所以只好用 apt-get purge git 和 apt-get autoremove 把 git 清掉。
然後 再 apt-get install git

把 git 裝回來(結果是 1.7.1) 。
就 OK 了。

結果 android repo 需要 1.7.2...

設法 安裝 1.7.2 以上...(結果裝到 1.8.3.4)
git difftool 又是 read-only...

後來發現vim 打開雖然是 RO,但是寫入時加上強制 '!' 符號,還是可以寫入


其實只要在 .vimrc 下,增加一個option:
:set noro
就可以了..