In Android studio there are options at the bottom right corner to handle branches. In Merge option when I merge another remote or local branch, it shows me options like Force merge
and smart merge
.
What exactly they do?
When merging with local/remote branches?
its similar to Smart Checkout. Android Studio will stash local changes, check out the selected branch, and then unstash the changes. If a conflict occurs during the unstash operation, you will be prompted to merge the changes.
Smart merge executes the following commands:
git stash save "Uncommitted changes before Update at <MM/DD/YY>, <HH:MM>"
git merge <remote>
git stash pop
(if merge successful) If the merge is unsuccessful and you abort or discard changes, you'll need to run git stash pop
yourself to get back your changes.
You can see the exact commands being executed by examining the Version Control context in Android Studio, in the Console tab:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With