在使用git在本地跟踪项目后,如何将其添加到GitHub? [英] After using git to locally track a project, how can I add it to GitHub?
本文介绍了在使用git在本地跟踪项目后,如何将其添加到GitHub?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您已经在线创建了存储库。
cd
到本地存储库的目录
git remote add origin whatever-address-my-repository is.git
设置远程
然后制作一个提交并推送到master分支。
git push -u origin master
https://help.github.com/articles/create -a-repo
After using git to locally track a project, how can I add it to GitHub?
解决方案
GitHub gives you instructions after you've created the repository online.
cd
to the directory with the local repository
git remote add origin whatever-address-my-repository is.git
to set the remote
then make a commit, and push to the master branch.
git push -u origin master
https://help.github.com/articles/create-a-repo
这篇关于在使用git在本地跟踪项目后,如何将其添加到GitHub?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文