git怎么初始化呢?
伊谢尔伦
伊谢尔伦 2017-05-02 09:24:31
[Git讨论组]

在github上建了一个项目,本地也有代码,本地用git init初始化了一下,请问然后怎么将本地的代码提交到github上呢?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(4)
阿神

请看 帮助 https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

迷茫

点开你在 github 上的项目链接,如果是空的,会有详细步骤

滿天的星座

1 本地生成ssh-key: ssh-keygen -t rsa -C "$userEmail"
2 github帐号上粘贴公钥
3 本地添加远程库: git remote add origin git@xxxxx.git
4 测试是否成功-->commit一个文件,然后push,看github上是否有

5 以后在此电脑上连接别的github库时,1,2步骤省略

習慣沉默

1 本地生成秘要 : $ ssh-keygen -t rsa -C "youremail@example.com"
2 然后cd .ssh 进入文件夹 vim id_rsa.pub 将秘要粘贴到github 中(位于“Account settings”,“SSH Keys”页面)
3 关联本地与远程长裤(注意修改地址):$ git remote add origin git@github.com:michaelliao/learngit.git
4 $ git push -u origin master
5 以后推送直接使用命令 :$ git push origin master

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号