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