Git 常用命令

https://www.zhihu.com/question/20866683?sort=created
Bonobo.Git.Server 500错误 注意 不要勾选3.5! 不要勾选3.5 !@不要勾选3.5!
这样基本没啥问题
https://bonobogitserver.com/ // windows下 git服务器安装
https://git-scm.com/book/zh/v2/Git-%E5%9F%BA%E7%A1%80-%E8%8E%B7%E5%8F%96-Git-%E4%BB%93%E5%BA%93 // git文档

查看当前状态

git status

新建分支

git checkout -b develop

新建分支并关联到远端

git checkout -b develop origin/develop

切换分支

git checkout xxx

忘记命令

git checkout --help

强制回退到上一次提交

git reset --hard head~1

撤销所有修改

git checkout .

解决冲突后 有问题

git commit -a 一下就能自当合并了

设置代理

add
git config --global http.proxy 'http://127.0.0.1:1080'
git config --global https.proxy 'http://127.0.0.1:1080'
remove
git config --global --unset http.proxy
git config --global --unset https.proxy

递归克隆

git clone xxx --recursive

深度(最新版本)拷贝

--depth=1

文件换行问题

windows 操作系统
参考 https://help.github.com/en/articles/configuring-git-to-handle-line-endings
添加 .gitattributes文件

# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
#*.c text
#*.h text
*.md text
*.js text
*.json text
*.asset text
*.mat text

# Declare files that will always have CRLF line endings on checkout.
#*.sln text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary

Unity的话则需要用到一个官方提供的合并工具

git保存密码

在 .gitconfig 和 config下加这个

[credential] 
     helper = store 

pip科学设置

 pip config --editor C:\WINDOWS\system32\notepad.exe edit
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值