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