美文网首页
2019-11-21终端或者Linux当中上传项目到码云

2019-11-21终端或者Linux当中上传项目到码云

作者: 惜小八 | 来源:发表于2019-11-21 18:55 被阅读0次

    1.git status
    1.查看工作区的状态:必须要先进入到项目所在的目录当中才可以使用git status和其他命令
    ➜  / cd /Users/laochaochunfengting/ideaworkspace/mmall
    ➜  mmall git:(v1.0) git status
    On branch v1.0
    Your branch is up to date with 'origin/v1.0'.
    
    nothing to commit, working tree clean
    ➜  mmall git:(v1.0) 
    
    ➜  mmall git:(v1.0) ✗ git status
    On branch v1.0
    Your branch is up to date with 'origin/v1.0'.
    
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
    
            new file:   src/main/resources/applicationContext-datasource.xml
            new file:   src/main/resources/applicationContext.xml
            new file:   src/main/resources/datasource.properties
            new file:   src/main/resources/generatorConfig.xml
            new file:   src/main/resources/logback.xml
            new file:   src/main/webapp/WEB-INF/dispatcher-servlet.xml
    
    Changes not staged for commit:
      (use "git add <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)
    
            modified:   pom.xml
            modified:   src/main/resources/applicationContext-datasource.xml
            modified:   src/main/resources/datasource.properties
            modified:   src/main/resources/logback.xml
            modified:   src/main/webapp/WEB-INF/dispatcher-servlet.xml
            modified:   src/main/webapp/WEB-INF/web.xml
    
    Untracked files:
      (use "git add <file>..." to include in what will be committed)
    
            src/main/java/
            src/main/resources/mappers/
    
    ➜  mmall git:(v1.0) ✗ 
    Untracked files:提示我们有未跟踪的文件,要求去add
    
    2.git add .
    2.git add . 将所有的变更提交
    ➜  mmall git:(v1.0) ✗ git add .
    ➜  mmall git:(v1.0) ✗ git status
    On branch v1.0
    Your branch is up to date with 'origin/v1.0'.
    
    Changes to be committed:
      (use "git reset HEAD <file>..." to unstage)
    
            modified:   pom.xml
            new file:   src/main/java/com/mmall/dao/CartMapper.java
            new file:   src/main/java/com/mmall/dao/CategoryMapper.java
            new file:   src/main/java/com/mmall/dao/OrderItemMapper.java
            new file:   src/main/java/com/mmall/dao/OrderMapper.java
            new file:   src/main/java/com/mmall/dao/PayInfoMapper.java
            new file:   src/main/java/com/mmall/dao/ProductMapper.java
            new file:   src/main/java/com/mmall/dao/ShippingMapper.java
            new file:   src/main/java/com/mmall/dao/UserMapper.java
            new file:   src/main/java/com/mmall/pojo/Cart.java
            new file:   src/main/java/com/mmall/pojo/Category.java
            new file:   src/main/java/com/mmall/pojo/Order.java
            new file:   src/main/java/com/mmall/pojo/OrderItem.java
            new file:   src/main/java/com/mmall/pojo/PayInfo.java
            new file:   src/main/java/com/mmall/pojo/Product.java
            new file:   src/main/java/com/mmall/pojo/Shipping.java
            new file:   src/main/java/com/mmall/pojo/User.java
            new file:   src/main/resources/applicationContext-datasource.xml
            new file:   src/main/resources/applicationContext.xml
            new file:   src/main/resources/datasource.properties
            new file:   src/main/resources/generatorConfig.xml
            new file:   src/main/resources/logback.xml
            new file:   src/main/resources/mappers/CartMapper.xml
            new file:   src/main/resources/mappers/CategoryMapper.xml
            new file:   src/main/resources/mappers/OrderItemMapper.xml
            new file:   src/main/resources/mappers/OrderMapper.xml
            new file:   src/main/resources/mappers/PayInfoMapper.xml
            new file:   src/main/resources/mappers/ProductMapper.xml
            new file:   src/main/resources/mappers/ShippingMapper.xml
            new file:   src/main/resources/mappers/UserMapper.xml
            new file:   src/main/webapp/WEB-INF/dispatcher-servlet.xml
            modified:   src/main/webapp/WEB-INF/web.xml
    
    ➜  mmall git:(v1.0) ✗ 
    
    3.提交
    git commit -am "project init commit"  # -am是用来写提交评论的
    
    ➜  mmall git:(v1.0) ✗ git commit -am 'project init commit'
    [v1.0 263d20f] project init commit
     32 files changed, 3066 insertions(+), 74 deletions(-)
     rewrite pom.xml (61%)
     create mode 100644 src/main/java/com/mmall/dao/CartMapper.java
     create mode 100644 src/main/java/com/mmall/dao/CategoryMapper.java
     create mode 100644 src/main/java/com/mmall/dao/OrderItemMapper.java
     create mode 100644 src/main/java/com/mmall/dao/OrderMapper.java
     create mode 100644 src/main/java/com/mmall/dao/PayInfoMapper.java
     create mode 100644 src/main/java/com/mmall/dao/ProductMapper.java
     create mode 100644 src/main/java/com/mmall/dao/ShippingMapper.java
     create mode 100644 src/main/java/com/mmall/dao/UserMapper.java
     create mode 100644 src/main/java/com/mmall/pojo/Cart.java
     create mode 100644 src/main/java/com/mmall/pojo/Category.java
     create mode 100644 src/main/java/com/mmall/pojo/Order.java
     create mode 100644 src/main/java/com/mmall/pojo/OrderItem.java
     create mode 100644 src/main/java/com/mmall/pojo/PayInfo.java
     create mode 100644 src/main/java/com/mmall/pojo/Product.java
     create mode 100644 src/main/java/com/mmall/pojo/Shipping.java
     create mode 100644 src/main/java/com/mmall/pojo/User.java
     create mode 100755 src/main/resources/applicationContext-datasource.xml
     create mode 100755 src/main/resources/applicationContext.xml
     create mode 100644 src/main/resources/datasource.properties
     create mode 100755 src/main/resources/generatorConfig.xml
     create mode 100755 src/main/resources/logback.xml
     create mode 100644 src/main/resources/mappers/CartMapper.xml
     create mode 100644 src/main/resources/mappers/CategoryMapper.xml
     create mode 100644 src/main/resources/mappers/OrderItemMapper.xml
     create mode 100644 src/main/resources/mappers/OrderMapper.xml
     create mode 100644 src/main/resources/mappers/PayInfoMapper.xml
     create mode 100644 src/main/resources/mappers/ProductMapper.xml
     create mode 100644 src/main/resources/mappers/ShippingMapper.xml
     create mode 100644 src/main/resources/mappers/UserMapper.xml
     create mode 100755 src/main/webapp/WEB-INF/dispatcher-servlet.xml
     rewrite src/main/webapp/WEB-INF/web.xml (93%)
     mode change 100644 => 100755
    
    
    ➜  mmall git:(v1.0) git status
    On branch v1.0
    Your branch is ahead of 'origin/v1.0' by 1 commit.
      (use "git push" to publish your local commits)
    
    nothing to commit, working tree clean
    没有新的东西需要我们去提交了,建议我们去git push,因为此时我们只是把项目的改变调教到了本地,如果我们想要把改变提交到github上,我们还需要git push
    
    3.git push(推送到github上)
    ➜  mmall git:(v1.0) git push
    Enumerating objects: 52, done.
    Counting objects: 100% (52/52), done.
    Delta compression using up to 8 threads
    Compressing objects: 100% (42/42), done.
    Writing objects: 100% (45/45), 19.44 KiB | 2.43 MiB/s, done.
    Total 45 (delta 17), reused 0 (delta 0)
    remote: Powered by GITEE.COM [GNK-3.8]
    To gitee.com:superzqbo/mmall_learning.git
       1c03748..263d20f  v1.0 -> v1.0
    ➜  mmall git:(v1.0) 
    

    此时我们就可以在github上看到我们提交的项目啦!!!

    相关文章

      网友评论

          本文标题:2019-11-21终端或者Linux当中上传项目到码云

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