We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$ ls -al ~/.ssh #检查本地的ssh $ ssh-keygen -t rsa -C "[email protected]" # 创建新的ssh秘钥命令
会给出秘钥存放位置
文件目录
eval "$(ssh-agent -s)" # Agent pid 59566 ssh-add ~/.ssh/id_rsa
将我创建的远端库克隆到本地的命令
git clone [email protected]:Kelichao/gittest.git
我的电脑上生成了目标目录
git remote add origin [email protected]:Kelichao/gittest.git #与我想要上传的github仓库链接
如果出现了fatal: remote origin already exists.则需要切断之前的git链接
git remote rm origin #先删除远程 Git 仓库 连接 git remote add origin [email protected]:Kelichao/gittest.git #上传代码
提交修改好的文件到远端仓库
git add bbb.txt# 添加文件到缓存 git commit -m "添加一个新文件" git push origin master #提交到远端绑定好的代码仓库
提交成功
The text was updated successfully, but these errors were encountered:
No branches or pull requests
如何用git在github提交文件
一、生成ssh秘钥
二、将新生成的key添加到ssh-agent中
三、将ssh key添加到GitHub中
四、将库克隆到本地
五、连接远端仓库
六、提交本地代码到远端库
The text was updated successfully, but these errors were encountered: