美文网首页
本地已经存在项目导入github

本地已经存在项目导入github

作者: LI木水 | 来源:发表于2018-09-14 14:31 被阅读0次

    1.进入项目目录初始化

    D:\weixin\ding_xcx
    λ git init
    Initialized empty Git repository in D:/weixin/ding_xcx/.git/
    

    2.添加远程仓库地址

    D:\weixin\ding_xcx (master -> origin)
    λ git remote add origin https://gitee.com/ding_ding_mall/ding_xcx.git
    

    3.执行pull动作

    D:\weixin\ding_xcx (master -> origin)
    λ git pull origin master
    remote: Enumerating objects: 3, done.
    remote: Counting objects: 100% (3/3), done.
    remote: Compressing objects: 100% (2/2), done.
    remote: Total 3 (delta 0), reused 0 (delta 0)
    Unpacking objects: 100% (3/3), done.
    From https://gitee.com/ding_ding_mall/ding_xcx
     * branch            master     -> FETCH_HEAD
     * [new branch]      master     -> origin/master
    

    4.add & commit

    D:\weixin\ding_xcx (master -> origin)
    λ git add .
    warning: LF will be replaced by CRLF in project.config.json.
    The file will have its original line endings in your working directory.
    
    D:\weixin\ding_xcx (master -> origin)
    λ git status
    On branch master
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
    
            new file:   app.js
            new file:   app.json
            new file:   app.wxss
            new file:   pages/index/index.js
            new file:   pages/index/index.wxml
            new file:   pages/index/index.wxss
            new file:   pages/logs/logs.js
            new file:   pages/logs/logs.json
            new file:   pages/logs/logs.wxml
            new file:   pages/logs/logs.wxss
            new file:   project.config.json
            new file:   utils/util.js
    D:\weixin\ding_xcx (master -> origin)
    λ git commit -m "小程序测试"
    [master c90e33e] 小程序测试
    
    warning: LF will be replaced by CRLF in project.config.json.
    The file will have its original line endings in your working directory.
     12 files changed, 281 insertions(+)
     create mode 100644 app.js
     create mode 100644 app.json
     create mode 100644 app.wxss
     create mode 100644 pages/index/index.js
     create mode 100644 pages/index/index.wxml
     create mode 100644 pages/index/index.wxss
     create mode 100644 pages/logs/logs.js
     create mode 100644 pages/logs/logs.json
     create mode 100644 pages/logs/logs.wxml
     create mode 100644 pages/logs/logs.wxss
     create mode 100644 project.config.json
     create mode 100644 utils/util.js
    

    5. push

    D:\weixin\ding_xcx (master -> origin)
    λ git push
    fatal: The current branch master has no upstream branch.
    To push the current branch and set the remote as upstream, use
    
        git push --set-upstream origin master
    
    
    D:\weixin\ding_xcx (master -> origin)
    λ git push --set-upstream origin master
    Counting objects: 18, done.
    Delta compression using up to 4 threads.
    Compressing objects: 100% (17/17), done.
    Writing objects: 100% (18/18), 4.06 KiB | 0 bytes/s, done.
    Total 18 (delta 0), reused 0 (delta 0)
    remote: Powered by Gitee.com
    To https://gitee.com/ding_ding_mall/ding_xcx.git
       358a41a..c90e33e  master -> master
    Branch master set up to track remote branch master from origin.
    
    

    相关文章

      网友评论

          本文标题:本地已经存在项目导入github

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