zoukankan      html  css  js  c++  java
  • 怎样将本地仓推送到码云线上

    怎么把本地项目推送到GitHub或者码云线上呢?来来回回错了很多次,终于总结了正确的步骤。
     首先注册好github账号,或者码云账号。
    1.然后建一个自己的本地仓,你可以直接右击新建文件夹,也可以右击打开Git bash命令行窗口通过命令来创建。
    2.通过命令git init把这个文件夹变成Git可管理的仓库
    Administrator@QH-20180419EFGP MINGW64 ~/Desktop/vue02
    $ git init
    Initialized empty Git repository in C:/Users/Administrator/Desktop/vue02/.git/
    3.这里提示你虽然把项目粘贴过来了,但还没有add到Git仓库上,然后我们通过git add .把刚才复制过来的项目全部添加到仓库上。
    Administrator@QH-20180419EFGP MINGW64 ~/Desktop/vue02 (master)
    $ git add . 
    4.用git commit -m "日志" 把项目提交到仓库。
    Administrator@QH-20180419EFGP MINGW64 ~/Desktop/vue02 (master)
    $ git commit -m "vue02test"
    On branch master
    Initial commit
    nothing to commit
    5.去线上建一个仓库并去下ssh码。git@gitee.com:xxx/vue02.git
    6.git remote add origin +线上仓库地址 
    7.git push origin master
    报了错(failed to push some refs to '地址')走下面:git pull --rebase origin master
    8.再次 git push origin master 
  • 相关阅读:
    mysql高级之编程优化
    高性能产品必由之路
    linux下安装xhprof
    linux下安装apc
    linux下安装vld
    python装饰器通俗易懂的解释!
    python函数基础 与文件操作
    python基础入门一(语法基础)
    iOS Keychain,SSKeychain,使用 理解 原理
    起头
  • 原文地址:https://www.cnblogs.com/hilxj/p/11011711.html
Copyright © 2011-2022 走看看