git 常用基本命令和工具

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值