[Git] cherry-pick 的順序

張庭瑋
Jul 30, 2021

--

*本篇只是小筆記

今天在工作的時候遇到一個狀況

同事:舊的版本也要用這幾個 commit,幫我發一份過來

我:(直接從新版扔 MR)

同事:(關掉 MR)用 cherry-pick

我:(抖)

總共需要4個 commit

從新到舊是 sha1, sha2, sha3, sha4

於是我下了

git cherry-pick sha1 sha2 sha3 sha4

結果撿進來的東西不完整

同事:不就 git cherry-pick sha4 sha3 sha2 sha1

我:我下的順序跟你是反的

同事:難怪……要依現實時間從舊到新啊

我:Orz

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response