Reputation: 812
I prefer to use the Android Studio VCS UI as much as possible. Currently when I have to squash commits, I have to go through the command line and even open up a command line editor (with the git rebase -i command).
I was hoping that there was a clean way to do this through a Visual Studio UI. Is there one?
Upvotes: 13
Views: 19099
Reputation: 4342
You can open the commits from bottom of Android Studio
And select the commits you want to squash and right click , you will see the context menu
Select Squash Commit and add your commit message.
Upvotes: 0
Reputation: 697
In addition to the answer mentioned by @Crain, you can select multiple commits and then there is an option to squash. This is for Android studio chipmunk.
Upvotes: 2
Reputation: 3608
I am adding the whole process for squashing commit here, just in case.
Upvotes: 3
Reputation: 244
I prefer using the UI too I have found that squash commits can be made in "Rebasing commits" window: "Version Control" -> "Log" -> "Select base commit" -> "Context menu" -> "Interactively Rebase From Here..."
Upvotes: 13
Reputation: 38639
Go to VCS -> Git -> Rebase...
, there you can amongst other things check 'Interactive'. At least in the latest IntelliJ IDEA version it is like that and AS is based on IJ. If your AS version is based off an older IJ version, it might be different if possible at all.
Btw. you don't have to use a command line editor when doing interactive rebase from command line. I e. g. have an alias that sets my Git editor to jEdit, so I can decide on each command that needs an editor whether I want to use the command line editor vim, or the GUI tool jEdit. But it can be configured persistently without an alias too of course.
Upvotes: 6