简体   繁体   中英

I merged a commit into master and am now getting a message about cherry-picking. Would appreciate advise on what is safe to do

Here's the status of my GitHub files:

$ git status
On branch master
Your branch is ahead of 'origin/master' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 41a0584.
  (all conflicts fixed: run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

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

    Ja/Ja.sln

nothing added to commit but untracked files present (use "git add" to track)

I realize it's suggesting what I should do but could someone explain what it's saying and how I can find out what I might lose if I run the abort option?

git doesn't suggest you to cherry-pick, it's telling you that a cherry-pick is currently in process and unfinished .

Basically, to exit this state and return to normal, you could either abort it or conclude it with a commit :

# to get back to the state before cherry-picking
git cherry-pick --abort

--abort will bring your branch back to the point where it was just before the cherry-picking started.

Or, if you do want to keep these recent changes brought by said commit 41a0584

# check that you don't have remaining conflicts
git status

# here, resolve any potential conflicts and check if everything is fine

# when you're happy with the current state, as git hints in the output
git cherry-pick --continue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM