Git Notes

Git Notes

git 源码安装

1
//依赖库 gcc gcc-c++

git proxy

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
//http || https
git config --global http.proxy 127.0.0.1:2080
git config --global https.proxy 127.0.0.1:2080

//sock5代理
git config --global http.proxy socks5 127.0.0.1:2080
git config --global https.proxy socks5 127.0.0.1:2080

git config --global --get http.proxy
git config --global --get https.proxy

git config --global --unset http.proxy
git config --global --unset https.proxy

git log

  • -p 显示diff补丁 -2 限定数量
  • --stat 显示简略统计信息
  • --pretty =oneline一行输出 =short,full,fuller
    1
    2
    3
    4
    
    $ git log --pretty=format:"%h - %an, %ar : %s"
      ca82a6d - Scott Chacon, 6 years ago : changed the version number
      085bb3b - Scott Chacon, 6 years ago : removed unnecessary test
      a11bef0 - Scott Chacon, 6 years ago : first commit
    
Licensed under CC BY-NC-SA 4.0
最后更新于 Aug 14, 2024 09:45 UTC