git命令学习网站
推荐 https://www.runoob.com/git/git-basic-operations.html
和常用 Git 命令清单 https://www.ruanyifeng.com/blog/2015/12/git-cheat-sheet.html
git pull时报用户名密码不正确
删除用户名密码:
git config --system --unset credential.helper
重新设置:
git config --global credential.helper store
然后输入一次账号密码即可。
git push/pull时总需要输入用户名密码的解决方案
$ git config --global credential.helper store
然后再拉一下代码,输入用户名和密码,就保存下来了。不用再输入用户名和密码了。
gitlab或者github下fork后如何同步源的新更新
https://blog.csdn.net/u012386311/article/details/78221058
首先要先确定一下是否建立了主repo的远程源:
git remote -v
如果里面只能看到你自己的两个源(fetch 和 push),那就需要添加主repo的源:
git remote add upstream URL
git remote -v
然后你就能看到upstream了。
如果想与主repo合并:
git fetch upstream
git merge upstream/master
改善git使用效率
参考:http://maximomussini.com/posts/bash-git-prompt/
Installation on OS X
First, install bash-completion using Homebrew:
brew install bash-completion
and then add this line to ~/.bash_profile to load the plugin:
[[ -f "$(brew --prefix)/etc/bash_completion" ]] && source "$(brew --prefix)/etc/bash_completion"
Installation on Ubuntu
sudo apt-get install bash-completion
Git可视化工具
TortoiseGit 客户端安装及功能使用
https://blog.csdn.net/sinat_16998945/article/details/81062278