1.更改remote地址

git上传公钥后,每次git push 仍需要填写用户名与密码?

git的remote要使用ssh地址,而首次clone时使用了https地址,需要将remote地址改为ssh地址:

git remote set-url origin git@gitee.com:*****.git

当然,以上命令在git仓库迁移到新的地址时使用也有效


2.git status中文显示

git status 中文显示为8进制数字

使用以下命令正常:

git config --global core.quotePath false


3.创建仓库

在服务器上创建git仓库,例如在/root/下创建books仓库:

git init --bare books