Reputation: 1080
I clicked the "Cherry-Pick" button in the "Version Control" tab at the bottom of Android Studio and it seems like all hell has broke loose.
I have these tags around my code in some classes:
<<<<<<< HEAD
=======
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
>>>>>>> ddebdcb... implemented favoriting functionality
and it's causing java syntax errors obviously, but I'm not sure if that since those lines were added into my source code that other things could have changed as well. I clicked revert so I could go back to the last commit, but it doesn't change the problem. The lines are still in my code, and before I delete them I want to know what I'm doing. Please help!
Also, I'm now noticing that classes for which I've changed the name are reappearing in the same package as their newer versions. And also some of my files which were tracked by git are now visually shown as not tracked (class name is in red letters).
Upvotes: 0
Views: 6924
Reputation: 73
In Android Studio right hand corner select your branch --- in the options you can see Abort Cherry pick option on the top
Upvotes: 0
Reputation: 28076
You have a merge conflict. You have made changes to files that are also changed in the cherry picked commit, and git can't figure out which changes to use, so it's showing both options.
See (for example) this question for more information: How to resolve merge conflicts in Git?
Alternatively, from the command line (e.g. git bash if you are on windows), you should be able to go back to the pre-cherry-pick state with git cherry-pick --abort
.
Upvotes: 2