改了 4 个文件,然后 一顿操作如下: 一:先 pull 代码 ,提示有人提交过代码
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git pull
remote: Enumerating objects: 852, done.
remote: Counting objects: 100% (852/852), done.
remote: Compressing objects: 100% (340/340), done.
remote: Total 852 (delta 357), reused 748 (delta 312)
Receiving objects: 100% (852/852), 207.41 KiB | 131.00 KiB/s, done.
Resolving deltas: 100% (357/357), completed with 11 local objects.
From https://gitlab.charge-spot.com/backend-group/chargespot-business-api
7bb0b5eb..ae21cc9d feature-init20200401 -> origin/feature-init20200401
error: Your local changes to the following files would be overwritten by merge:
business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/BatteryServiceImpl.java
Please commit your changes or stash them before you merge.
Aborting
Updating 7bb0b5eb..ae21cc9d
二: add 和 看一下 status
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git status
On branch feature-init20200401
Your branch is behind 'origin/feature-init20200401' by 61 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/BatteryServiceImpl.java
三:commit
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git commit -m '去掉 log'
[feature-init20200401 c3c59ecc] 去掉 log
1 file changed, 2 deletions(-)
四:commit 后再 pull 一下
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git pull
Auto-merging business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/BatteryServiceImpl.java
Merge made by the 'recursive' strategy.
.../device/client/DeviceOwnerRelClient.java | 9 ++
.../fallback/DeviceOwnerRelClientFallBack.java | 5 +
.../com/chargespot/device/dto/DeviceModelDTO.java | 18 +++
.../chargespot/device/vo/ExportDeviceListVO.java | 2 +-
business-device/business-device-biz/pom.xml | 2 +-
.../device/mapper/DeviceOwnerRelMapper.java | 11 ++
.../device/service/DeviceOwnerRelService.java | 8 ++
.../device/service/impl/BatteryServiceImpl.java | 4 +-
.../service/impl/DeviceGroupServiceImpl.java | 4 +-
.../service/impl/DeviceOperationsServiceImpl.java | 2 +-
.../service/impl/DeviceOwnerRelServiceImpl.java | 20 ++-
.../device/service/impl/DeviceServiceImpl.java | 8 +-
.../device/web/DeviceOwnerRelController.java | 5 +
.../mapper/extend/DeviceOwnerRelMapperExtend.xml | 18 ++-
.../chargespot/move/model/BusinessDeviceRelVO.java | 3 +
.../move/service/impl/CabinetGroupServiceImpl.java | 2 +-
.../service/impl/MemberCouponsServiceImpl.java | 55 ++++----
.../move/service/impl/MoveServiceImpl.java | 61 +++++----
.../mapper/extend/CabinetMapperExtend.xml | 3 +-
.../mapper/extend/MemberCouponsMapperExtend.xml | 5 +-
.../order/service/impl/OrderLendServiceImpl.java | 1 +
.../mapper/extend/OrderOwnerMapperExtend.xml | 4 +-
.../proxy/client/ProxyAccountClient.java | 2 +
.../fallback/ProxyAccountClientFailback.java | 5 +
.../chargespot/proxy/model/GetDrawAmountDTO.java | 6 +
.../chargespot/proxy/config/param/DramParam.java | 5 +
.../chargespot/proxy/handler/MqMessageHandler.java | 13 +-
.../proxy/mapper/ProxyDrawOrderMapper.java | 8 ++
.../proxy/service/ProxyAccountService.java | 7 ++
.../proxy/service/ProxyOrderBillService.java | 3 +-
.../service/impl/ProxyAccountServiceImpl.java | 86 ++++++++++++-
.../service/impl/ProxyDrawOrderServiceImpl.java | 48 ++++---
.../proxy/service/impl/ProxyIndexServiceImpl.java | 139 +++++++--------------
.../service/impl/ProxyOrderBillServiceImpl.java | 6 +-
.../proxy/web/ProxyAccountController.java | 7 ++
.../mapper/extend/ProxyDrawOrderMapperExtend.xml | 38 +++++-
.../mapper/extend/ProxyOrderBillMapperExtend.xml | 8 +-
.../business/job/BusinessDeviceEventJob.java | 40 +++---
.../impl/BusinessmenCouponsMemberServiceImpl.java | 13 --
.../impl/BusinessmenOwnerRelServiceImpl.java | 4 +-
.../service/impl/BusinessmenServiceImpl.java | 111 ++++++++--------
41 files changed, 506 insertions(+), 293 deletions(-)
create mode 100644 business-device/business-device-base/src/main/java/com/chargespot/device/dto/DeviceModelDTO.java
五:再 add 并且看一下 status(在这里提示修改是正确的,4 个文件)
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git add .
gi
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git status
On branch feature-init20200401
Your branch is ahead of 'origin/feature-init20200401' by 2 commits.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
modified: business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/BlackListBatteryServiceImpl.java
modified: business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/DeviceOperationsServiceImpl.java
modified: business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/DeviceOwnerRelServiceImpl.java
modified: business-device/business-device-biz/src/main/java/com/chargespot/device/service/impl/DevicePreWarningDataServiceImpl.java
最后再 commit 和 push
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git commit -m '去 log'
[feature-init20200401 9e87e2c6] 去 log
4 files changed, 6 insertions(+), 20 deletions(-)
qiann@LAPTOP-DHDFP0PP MINGW64 /c/project/chargespot-business-api (feature-init20200401)
$ git push origin
Enumerating objects: 66, done.
Counting objects: 100% (66/66), done.
Delta compression using up to 12 threads
Compressing objects: 100% (33/33), done.
Writing objects: 100% (42/42), 20.74 KiB | 1.22 MiB/s, done.
Total 42 (delta 20), reused 0 (delta 0)
remote:
remote: To create a merge request for feature-init20200401, visit:
remote: https://gitlab.charge-spot.com/backend-group/chargespot-business-api/merge_requests/new?merge_request%5Bsource_branch%5D=feature-init20200401
remote:
To https://gitlab.charge-spot.com/backend-group/chargespot-business-api.git
ae21cc9d..9e87e2c6 feature-init20200401 -> feature-init20200401
,然后看了下,把同事代码删了
是我操作不对吗?为什么会这样,大哥们
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.