git常用命令


git config --global http.proxy http://127.0.0.1:1081       #設置http代理
git config --global https.proxy https://127.0.0.1:1081     #設置https代理
git config --global http.proxy 'socks5://127.0.0.1:1081'       #設置socks代理
git config --global https.proxy 'socks5://127.0.0.1:1081'      #設置socks代理

git config --global core.autocrlf false #去除warning:LF will be replaced by CRLF警告
git rm -r --cached . #忽略文件不生效時使用如下命令后再提交
git config --global user.name "<name>" #配置用戶名
git config --global user.email "<email>" #配置郵箱
git daemon --reuseaddr --base-path=. --export-all --verbose --enable=receive-pack #開啟局域網訪問 需cd到git工程根目錄
git config --system core.longpaths true                                # 允許長文件名
git checkout -b test <name of remote>/test # 創建本地分支並切換到遠程分支
 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM