偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

CI校驗(yàn)不通過(guò),竟然被自己坑死了

開(kāi)發(fā) 前端
分享的內(nèi)容是工作中一些瑣碎的事情。記錄一下我是如何被git config坑的,導(dǎo)致CI校驗(yàn)竟然不通過(guò)。

[[398750]]

大家好,我是TianTian。

分享的內(nèi)容是工作中一些瑣碎的事情。

記錄一下我是如何被git config坑的,導(dǎo)致CI校驗(yàn)竟然不通過(guò)。

事故由來(lái)

當(dāng)我把bug解決休掉后,順利跑通后。”愉快“的補(bǔ)完單測(cè),提了個(gè)mr,CI校驗(yàn)竟然攔下來(lái)了。

圖1

當(dāng)時(shí)我的心情是復(fù)雜的,于是我點(diǎn)開(kāi)了這個(gè)Details。

看了半天,沒(méi)有啥有價(jià)值的錯(cuò)誤信息,接著索性打開(kāi)這個(gè)流水線,看看藍(lán)盾里面具體是哪個(gè)子流失線出現(xiàn)了問(wèn)題,找了半天后,發(fā)現(xiàn)了問(wèn)題。。。

圖2

好離譜,為啥我git email盡然有QQ郵箱。。。

為了驗(yàn)證我這個(gè)分支是否存在上述的這個(gè)問(wèn)題,我得排查一下:

  1. git log | grep 'Author' | head 

看到結(jié)果的時(shí)候,我呆滯住了:

圖3

居然真的有個(gè)commit記錄真的是qq郵箱,事情大概清楚了,之前master分支存在問(wèn)題,我刪掉項(xiàng)目,重新拉取一次master分支。

由于我全局配置的git config 是日常郵箱的問(wèn)題,沒(méi)有在意這個(gè)問(wèn)題,導(dǎo)致現(xiàn)在CI校驗(yàn)不通過(guò)。

那么解決問(wèn)題的辦法就是:

修改下commit歷史

如何解決

于是google一個(gè)方案,修改 git 歷史提交 commit 信息(重寫(xiě)歷史),文檔鏈接:

https://www.jianshu.com/p/0f1fbd50b4be

大致意思通過(guò) git rebase 命令,來(lái)完成操作:

  1. git rebase -i HEAD~3 
  2. // 修改近三次的信息 

將會(huì)得到如下的信息,這里的提交日志是和git log倒敘排列的,我們要修改的日志信息位于第一位:

  1.  1 pick 2275781 should find method from parent 
  2.  2 pick 223fc80 unit test case 
  3.  3 pick 9ac1179 update test case 
  4.  4 
  5.  5 # Rebase 79db0bd..9ac1179 onto 79db0bd (3 commands) 
  6.  6 # 
  7.  7 # Commands: 
  8.  8 # p, pick = use commit 
  9.  9 # r, reword = use commit, but edit the commit message 
  10. 10 # e, edit = use commit, but stop for amending 
  11. 11 # s, squash = use commit, but meld into previous commit 
  12. 12 # f, fixup = like "squash", but discard this commit's log message 
  13. 13 # x, exec = run command (the rest of the line) using shell 
  14. 14 # d, drop = remove commit 
  15. 15 # 
  16. 16 # These lines can be re-ordered; they are executed from top to bottom. 
  17. 17 # 
  18. 18 # If you remove a line here THAT COMMIT WILL BE LOST. 
  19. 19 # 
  20. 20 # However, if you remove everything, the rebase will be aborted. 
  21. 21 # 
  22. 22 # Note that empty commits are commented out 

我們可以根據(jù)Commands信息來(lái)修改這些信息,來(lái)選擇我們需要的參數(shù),最后來(lái)達(dá)到我們的目的。

其他思路

想到我修改的代碼,跟主干代碼master相差的其實(shí)很小,那么我可以做到代碼回滾,根據(jù)我們的id回退到指定的版本,主要通過(guò)的命令就是 git reset,然后選擇對(duì)于的參數(shù),也能滿足我們的需求。

reset的話,通常有三種命令,找了一個(gè)不錯(cuò)的文章,分享一下:

https://www.jianshu.com/p/c2ec5f06cf1a

一般來(lái)說(shuō),有hard,soft,mixed,三種模式,根據(jù)不同的場(chǎng)景來(lái)做選擇。

最后

不說(shuō)了,我準(zhǔn)備寫(xiě)bug去了。

 

責(zé)任編輯:姜華 來(lái)源: TianTianUp
相關(guān)推薦

2020-07-17 09:58:31

Python開(kāi)發(fā)工具

2023-11-12 22:03:25

CanonicalLinuxSnap

2022-04-08 08:48:16

線上事故日志訂閱者

2014-05-13 13:01:13

越過(guò)AppStore安裝應(yīng)用

2015-08-25 15:58:33

編程集錦

2022-12-15 10:44:35

2020-11-03 06:57:10

MyBatis數(shù)據(jù)庫(kù)

2019-09-18 15:20:16

MyBatisSQL數(shù)據(jù)庫(kù)

2021-07-16 07:57:35

SpringBootOpenFeign微服務(wù)

2019-07-25 15:10:11

攜號(hào)轉(zhuǎn)網(wǎng)業(yè)務(wù)運(yùn)營(yíng)商

2021-09-30 08:40:28

Oracle數(shù)據(jù)庫(kù)后端開(kāi)發(fā)

2021-05-10 11:04:46

Windows 操作系統(tǒng)微軟

2020-11-08 14:34:31

小視頻瀏覽器

2018-11-28 09:14:41

交換機(jī)網(wǎng)絡(luò)安防

2020-11-24 08:15:09

Elasticsear面試分布式

2025-04-22 03:00:00

模型SpringAI

2021-06-27 21:06:47

開(kāi)發(fā)循環(huán)依賴

2009-11-11 09:56:54

北電電信公司

2021-12-03 06:59:23

操作符驗(yàn)證點(diǎn)屬性

2020-12-29 05:39:44

日志服務(wù)環(huán)境
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)