git cherry-pick

https://stackoverflow.com/questions/1670970/how-to-cherry-pick-multiple-commits

bogon:Exchange-API-Services david git log
commit 2ba436c27baee63ba468ce10e0983c97dcd58fe3 (HEAD -> develop)
Author: david121 [email protected]
Date: Tue Feb 26 16:08:54 2019 +0800

added  bittrex withdaw address

bogon:Exchange-API-Services david git cherry-pick c5b079b5ae3b211791464fd28e69408a6205f39f
[develop 2118594f] add new assets
Date: Tue Feb 26 17:32:17 2019 +0800
2 files changed, 246 insertions(+), 9 deletions(-)
bogon:Exchange-API-Services david$

bogon:Exchange-API-Services david$ git status
On branch develop
Your branch and 'origin/develop' have diverged,
and have 6 and 8 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean

bogon:Exchange-API-Services david$ git push
To https://github.com/iht-dev/Exchange-API-Services.git
! [rejected] develop -> develop (non-fast-forward)
error: failed to push some refs to 'https://github.com/iht-dev/Exchange-API-Services.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

bogon:Exchange-API-Services david git push -f
Counting objects: 54, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (40/40), done.
Writing objects: 100% (54/54), 4.43 KiB | 755.00 KiB/s, done.
Total 54 (delta 28), reused 0 (delta 0)
remote: Resolving deltas: 100% (28/28), completed with 8 local objects.
To https://github.com/iht-dev/Exchange-API-Services.git

  • f3a1330d...403d1971 develop -> develop (forced update)
    bogon:Exchange-API-Services david$

=====================================================
服务器端:
root@dev-coreapi:~# cd /opt/Exchange-API-Services
root@dev-coreapi:/opt/Exchange-API-Services# cd deploy/
root@dev-coreapi:/opt/Exchange-API-Services/deploy# ./dev
From github.com:iht-dev/Exchange-API-Services

  • branch develop -> FETCH_HEAD

*** Please tell me who you are.

Run

git config --global user.email "[email protected]"
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 'root@dev-coreapi.(none)')
[INFO] Scanning for projects...
^Cnohup: appending output to 'nohup.out'
^C
root@dev-coreapi:/opt/Exchange-API-Services/deploy# ^C
root@dev-coreapi:/opt/Exchange-API-Services/deploy# ^C
root@dev-coreapi:/opt/Exchange-API-Services/deploy# cd ..
root@dev-coreapi:/opt/Exchange-API-Services# git status
On branch develop
Your branch and 'origin/develop' have diverged,
and have 7 and 6 different commits each, respectively.
(use "git pull" to merge the remote branch into yours)

nothing to commit, working tree clean
root@dev-coreapi:/opt/Exchange-API-Services# git pull

*** Please tell me who you are.

Run

git config --global user.email "[email protected]"
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 'root@dev-coreapi.(none)')
root@dev-coreapi:/opt/Exchange-API-Services# git branch -vv

  • develop 50eb1f7 [origin/develop: ahead 7, behind 6] update
    master ed66fdf [origin/master] database name change
    root@dev-coreapi:/opt/Exchange-API-Services# git remote -vv
    origin [email protected]:iht-dev/Exchange-API-Services.git (fetch)
    origin [email protected]:iht-dev/Exchange-API-Services.git (push)
    root@dev-coreapi:/opt/Exchange-API-Services# git log
    commit 50eb1f739cec4fb2a596c418f72bff12ce26f879 (HEAD -> develop)
    Author: david121 [email protected]
    Date: Tue Feb 26 18:29:35 2019 +0800

    update

commit 438f096501ae4382d7bd22181350c87d203fcd51
Author: david121 [email protected]
Date: Tue Feb 26 17:51:19 2019 +0800

update

commit 416d5b49de8e1f26b3ba3de8ce269fae568b2c69
Author: david121 [email protected]
Date: Tue Feb 26 17:44:55 2019 +0800

update

commit c5b079b5ae3b211791464fd28e69408a6205f39f
Author: david121 [email protected]
Date: Tue Feb 26 17:32:17 2019 +0800

add new assets

commit 7b4b137d886cc96a8b2d35233fbe9f7131a231fd
Author: david121 [email protected]
Date: Tue Feb 26 16:08:54 2019 +0800

added  bittrex withdaw address

commit e523b742fbea457fdababff87cf1f98638ae55c3
Author: Ares [email protected]
Date: Tue Feb 26 11:42:21 2019 +0800

fix NamedQuery

commit 11e2fd8cb66b88de90eb96bc9b189b62d110607c
Author: Ares [email protected]
Date: Tue Feb 26 11:25:19 2019 +0800

rename user entity

commit 69376fd643b8faac5e2d691d66dfe690fadf5324
Merge: d10a563 6b0a7e2
Author: Yang Jiabo [email protected]
Date: Mon Feb 25 16:20:57 2019 +0800

Merge branch 'develop' of https://github.com/iht-dev/Exchange-API-Services into develop

commit d10a5630579602dec08cbf5e1b5cca639967ded8
Author: Yang Jiabo [email protected]
Date: Mon Feb 25 16:20:41 2019 +0800
root@dev-coreapi:/opt/Exchange-API-Services# git reset --hard d10a5630579602dec08cbf5e1b5cca639967ded8
HEAD is now at d10a563 update i18n\assets.* note message
root@dev-coreapi:/opt/Exchange-API-Services# git pull
Updating d10a563..403d197
Fast-forward
src/main/java/com/exchange/config/EnvironmentConfig.java | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
src/main/java/com/exchange/enums/AssetCode.java | 76 ++++++++++++++++++++++++++++++++++++++++++--------
src/main/java/com/exchange/service/WithdrawService.java | 79 ++++++++++++++++++++++++++++++++++++++++++++++++----
src/main/resources/application.properties | 24 ++++++++++++++++
4 files changed, 334 insertions(+), 21 deletions(-)
root@dev-coreapi:/opt/Exchange-API-Services#
root@dev-coreapi:/opt/Exchange-API-Services#
root@dev-coreapi:/opt/Exchange-API-Services#
root@dev-coreapi:/opt/Exchange-API-Services#
root@dev-coreapi:/opt/Exchange-API-Services# cd deploy/
root@dev-coreapi:/opt/Exchange-API-Services/deploy# ./dev
From github.com:iht-dev/Exchange-API-Services

  • branch develop -> FETCH_HEAD
    Already up to date.
    [INFO] Scanning for projects...
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building exchange 0.0.1
    [INFO] ------------------------------------------------------------------------
    [INFO]
    [INFO] --- maven-clean-plugin:2.6.1:clean (default-clean) @ exchange-api-service ---
    [INFO] Deleting /opt/Exchange-API-Services/target
    [INFO]

你可能感兴趣的:(git cherry-pick)