Git Cherry Pick: Getting the Exact Commit You Want

After cloning, access the folder and open it using Visual Studio Code or another text editor/IDE of your preference. You can just run: git merge cleaner-code But take a look at what our history looks like now: As you can see, we now have two commits with the message “Add call to the extracted function.”. […]

After cloning, access the folder and open it using Visual Studio Code or another text editor/IDE of your preference. You can just run: git merge cleaner-code But take a look at what our history looks like now: As you can see, we now have two commits with the message “Add call to the extracted function.”. You can use the hash for that, but this time I’ll go with the branch name: git switch main git cherry-pick cleaner-code The command itself works just fine, as evidenced by the output of running git log -oneline: However, if I try to run the app, things don’t look so nice: What happened?
Source: CloudBees