美文网首页
本地项目关联github上的new repository

本地项目关联github上的new repository

作者: lijiaccy | 来源:发表于2017-08-11 11:04 被阅读0次

首先在github上新建一个repository

图片.png

然后输入这个名字

图片.png

这样github上多了一个repository

图片.png

命令行上传

进入项目文件夹中

 git init                   # 本地仓库初始化,执行完后会在工程目录下生成一个.git的隐藏目录
 git add .               # 添加所有文件到本地索引,命令用法:git add <file>
 git commit -m "My first commit operation"   # 提交修改到本地仓库,-m选项添加提交注释
 git remote add origin https://github.com/lijiaccy/tttt.git   # 添加远程仓库地址(在github中看),保存在origin变量中
 git push -u origin master      # 按照前一条命令中origin给定的github地址推送到github仓库的master分支

 **最后一步有可能报错,如果报错先执行**
   git pull origin master
  然后再执行git push -u origin master 

搞定。

相关文章

  • 本地项目关联github上的new repository

    首先在github上新建一个repository 然后输入这个名字 这样github上多了一个repository...

  • Git:本地项目上传到Github

    本地项目上传到Github 一开始在github上new repository以下命令在终端执行 cd 到本地项目...

  • ATOM与GitHub的协同工作

    将本地文件链接到GitHub 在GitHub上,create New Repository 填写Repositor...

  • GitHub

    本地工程绑定到GitHub …or create a new repository on the command ...

  • 新建github项目

    1.在GitHub上新建项目 进入github 点击右上角+号 New repository

  • 错误问题记录

    1、将Git 本地仓库和 GitHub 上新建的 Repository 关联 并push 本地代码到远程仓库 出现...

  • 上传本地项目到github

    本文将阐述如何将本地代码上传到github上的仓库。 1.在github上的Repository界面点击NEW新建...

  • git命令将本地项目推送至github

    1、githu上创建项目new repository2、终端进入本地项目根目录依次使用下面的命令 git本地仓库初...

  • 无标题文章

    在GitHub上管理项目 新建repository 本地目录下,在命令行里新建一个代码仓库(repository)...

  • 上传代码到github

    1.在github上新建项目 new repository 1.1 命名:跟项目名称一致 1.2 descri...

网友评论

      本文标题:本地项目关联github上的new repository

      本文链接:https://www.haomeiwen.com/subject/isjlrxtx.html