频道栏目
首页 > 系统 > Linux > 正文

git操作一之原库建分支

2018-06-13 15:06:41      个评论    来源:longlovefilm的博客  
收藏   我要投稿

git操作一之原库建分支。

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service                                                        (dev)
$ git pull
remote: Counting objects: 133, done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 133 (delta 71), reused 120 (delta 58)
Receiving objects: 100% (133/133), 10.87 KiB | 0 bytes/s, done.
Resolving deltas: 100% (71/71), completed with 15 local objects.
From https://180.168.71.6:8000/cmam/aggregation-game-service
   0331a45..f46c7e5  dev        -> origin/dev
   2be013a..2a85484  master     -> origin/master
Updating 0331a45..f46c7e5
error: Your local changes to the following files would be overwritten by merge:
        src/main/resources/bootstrap.yml
Please commit your changes or stash them before you can merge.
Aborting

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git diff
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/util/ParseXmlForActpointUtil.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/util/ParseXmlForContentUtil.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/util/ParseXmlForCopyrightUtil.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/util/ParseXmlForPropUtil.java.
The file will have its original line endings in your working directory.
diff --git a/pom.xml b/pom.xml
index c003529..12b8430 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
        com.migu
        aggregation-game-service
        0.0.1-SNAPSHOT
-       war
+       jar

        aggregation-game-service
        Demo project for Spring Boot
diff --git a/src/main/java/com/migu/cmam/game/aggregator/api/IGameApi.java b/src/main/java/com/migu/cmam/game/aggregator/api/IGameApi.java
index 4651961..3d9b38c 100644
--- a/src/main/java/com/migu/cmam/game/aggregator/api/IGameApi.java
+++ b/src/main/java/com/migu/cmam/game/aggregator/api/IGameApi.java
@@ -13,7 +13,6 @@ package com.migu.cmam.game.aggregator.api;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
-
 import com.migu.cmam.common.dto.Response;
 import com.migu.cmam.game.aggregator.domain.ConveyMsg;

@@ -42,5 +41,4 @@ public interface IGameApi {
      */
     @RequestMapping(value = "/initmsg", produces = { "application/json" }, method = RequestMethod.POST)
     Response initMsg(@RequestBody ConveyMsg conveyMsg);
-
 }
diff --git a/src/main/java/com/migu/cmam/game/aggregator/constant/constcode/CTaskDetailConst.java b/src/main/java/com/migu/cmam/game/aggregator/constant/constcode/CTaskDetailConst.java
index 97d7ef9..7633a71 100644
--- a/src/main/java/com/migu/cmam/game/aggregator/constant/constcode/CTaskDetailConst.java
+++ b/src/main/java/com/migu/cmam/game/aggregator/constant/constcode/CTaskDetailConst.java
@@ -39,4 +39,5 @@ public class CTaskDetailConst {
     public static final String DOWNLOAD_MSG_SEND_FAIL = "Download: download msg send failed.";
     public static final String DOWNLOAD_SUCCESS = "Download: download success.";
     public static final String DOWNLOAD_FAIL = "Download: download failed .";
+    public static final String COMPENSATION_DIAGNOSE_TIMEOUT = "compensation: diagnose timeout.";
 }
diff --git a/src/main/java/com/migu/cmam/game/aggregator/controller/GameController.java b/src/main/java/com/migu/cmam/game/aggregator/controller/GameController.java
index 1bebe79..61b43e9 100644
--- a/src/main/java/com/migu/cmam/game/aggregator/controller/GameController.java
+++ b/src/main/java/com/migu/cmam/game/aggregator/controller/GameController.java
@@ -13,9 +13,9 @@ package com.migu.cmam.game.aggregator.controller;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;^M

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git status
On branch dev
Your branch is behind 'origin/dev' by 19 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
Changes not staged for commit:
  (use "git add ..." to update what will be committed)
  (use "git checkout -- ..." to discard changes in working directory)

        modified:   pom.xml
        modified:   src/main/java/com/migu/cmam/game/aggregator/api/IGameApi.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/constant/constcode/CTaskDetailConst.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/controller/GameController.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/mq/MsgProducer.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/mq/channel/ICustomSource.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/repository/ICTaskRepository.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/repository/IConveyMsgRepository.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/repository/mongo/ICTaskMongoRepository.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/repository/mongo/IConveyMsgMongoRepository.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/repository/mongo/impl/CTaskMongoRepositoryImpl.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/repository/mongo/impl/ConveyMsgMongoRepositoryImpl.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/IAggregation.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/ConvergeServiceImpl.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/DownloadServiceImpl.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/PreServiceImpl.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/callback/CallBackServiceImpl.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/ActpointStrategy.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/CopyrightStrategy.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/GameStrategy.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/PropertyStrategy.java
        modified:   src/main/java/com/migu/cmam/game/aggregator/util/FilePathHelper.java
        modified:   src/main/resources/application.yml
        modified:   src/main/resources/bootstrap-online.yml
        modified:   src/main/resources/bootstrap-onlinetest.yml
        modified:   src/main/resources/bootstrap.yml

Untracked files:
  (use "git add ..." to include in what will be committed)

        src/main/java/com/migu/cmam/game/aggregator/api/IDiagnoseApi.java
        src/main/java/com/migu/cmam/game/aggregator/client/CompenMsgsStatusRest.java
        src/main/java/com/migu/cmam/game/aggregator/client/fallback/CompenMsgsStatusRestFallBack.java
        src/main/java/com/migu/cmam/game/aggregator/compensation/
        src/main/java/com/migu/cmam/game/aggregator/config/CompensationConfig.java
        src/main/java/com/migu/cmam/game/aggregator/constant/enumcode/CompensationStatusEnum.java
        src/main/java/com/migu/cmam/game/aggregator/controller/DiagnoseController.java
        src/main/java/com/migu/cmam/game/aggregator/util/CompensationUtil.java
        src/test/java/com/migu/cmam/game/aggregator/compensation/

no changes added to commit (use "git add" and/or "git commit -a")

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git stash

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'Administrator@GZ-20160802BKJG.(none)')
Cannot save the current index state

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git config --gloabl user.name "zhangchenglong"
error: unknown option `gloabl'
usage: git config []

Config file location
    --global              use global config file
    --system              use system config file
    --local               use repository config file
    -f, --file      use given config file
    --blob       read config from given blob object

Action
    --get                 get value: name [value-regex]
    --get-all             get all values: key [value-regex]
    --get-regexp          get values for regexp: name-regex [value-regex]
    --get-urlmatch        get value specific for the URL: section[.var] URL
    --replace-all         replace all matching variables: name value [value_regex]
    --add                 add a new variable: name value
    --unset               remove a variable: name [value-regex]
    --unset-all           remove all matches: name [value-regex]
    --rename-section      rename section: old-name new-name
    --remove-section      remove a section: name
    -l, --list            list all
    -e, --edit            open an editor
    --get-color           find the color configured: slot [default]
    --get-colorbool       find the color setting: slot [stdout-is-tty]

Type
    --bool                value is "true" or "false"
    --int                 value is decimal number
    --bool-or-int         value is --bool or --int
    --path                value is a path (file or directory name)

Other
    -z, --null            terminate values with NUL byte
    --name-only           show variable names only
    --includes            respect include directives on lookup
    --show-origin         show origin of config (file, standard input, blob, command line)


Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git config --global user.name "zhangchenglong"

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git config --global user.email "zhangchenglong@migu.cn"

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git stash
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/constant/constcode/CTaskDetailConst.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/mq/channel/ICustomSource.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/repository/ICTaskRepository.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/repository/mongo/ICTaskMongoRepository.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/service/IAggregation.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/service/impl/DownloadServiceImpl.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/ActpointStrategy.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/CopyrightStrategy.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/GameStrategy.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/service/impl/strategy/PropertyStrategy.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/java/com/migu/cmam/game/aggregator/util/FilePathHelper.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/resources/application.yml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/resources/bootstrap-online.yml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/resources/bootstrap-onlinetest.yml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in src/main/resources/bootstrap.yml.
The file will have its original line endings in your working directory.
Saved working directory and index state WIP on dev: 0331a45 open callbackService
HEAD is now at 0331a45 open callbackService

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git pull
Updating 0331a45..f46c7e5
Fast-forward
 .../constant/constcode/CmamIdConstants.java        | 40 +++++++++------
 .../stockhandler/FileCsvImportController.java      | 34 ++++++++-----
 .../migu/cmam/game/aggregator/util/FileTool.java   |  2 +-
 src/main/resources/bootstrap.yml                   | 58 +++++++++++-----------
 src/main/resources/logback-spring.xml              | 39 ++++-----------
 5 files changed, 89 insertions(+), 84 deletions(-)

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git stash pop
Auto-merging src/main/resources/bootstrap.yml
CONFLICT (content): Merge conflict in src/main/resources/bootstrap.yml

Administrator@GZ-20160802BKJG MINGW64 /e/migu/workspace/aggregation-game-service (dev)
$ git branch -nv
error: unknown switch `n'
usage: git branch [] [-r | -a] [--merged | --no-merged]
   or: git branch [] [-l] [-f]  []
   or: git branch [] [-r] (-d | -D) ...
   or: git branch [] (-m | -M) [] 
   or: git branch [] [-r | -a] [--points-at]

Generic options
    -v, --verbose         show hash and subject, give twice for upstream branch
    -q, --quiet           suppress informational messages
    -t, --track           set up tracking mode (see git-pull(1))
    --set-upstream        change upstream info
    -u, --set-upstream-to 
                          change the upstream info
    --unset-upstream      Unset the upstream info
    --color[=]      use colored output
    -r, --remotes         act on remote-tracking branches
    --contains    print only branches that contain the commit
    --abbrev[=]        use  digits to display SHA-1s

Specific git-branch actions:
    -a, --all             list both remote-tracking and local branches
    -d, --delete          delete fully merged branch
    -D                    delete branch (even if not merged)
    -m, --move            move/rename a branch and its reflog
    -M                    move/rename a branch, even if target exists
    --list                list branch names
    -l, --create-reflog   create the branch's reflog
    --edit-description    edit the description for the branch
    -f, --force           force creation, move/rename, deletion
    --merged      print only branches that are merged
    --no-merged   print only branches that are not merged
    --column[=
上一篇:git入门教程之git基础用法
下一篇:嵌入式(arm linux)搭建openvpn客户端
相关文章
图文推荐

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训 | 举报中心

版权所有: 红黑联盟--致力于做实用的IT技术学习网站