git使用遇到的问题

error: src refspec master does not match any.

git commit -m "init"
git remote add origin xxx.git
git push -u origin master

客户端私钥配置

ssh-add ~/.ssh/id_rsa

# Could not open a connection to your authentication agent.
# 如果发生以上错误
ssh-agent bash
ssh-add ~/.ssh/id_rsa

# /c/Users/99283/.ssh/id-rsa: No such file or directory
ssh -T git@github.com

更改git目录位置后不可用

1.打开cmd,输入regedit,打开注册表编辑器
2.在地址栏搜索:计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell,更改git_shell和git_gui的目录为移动后的git目录
3.在地址栏搜索:计算机\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell,更改git_shell和git_gui的目录为移动后的git目录

posted @ 2023-04-07 00:07  河图s  阅读(14)  评论(0)    收藏  举报