vscode-gitflow icon indicating copy to clipboard operation
vscode-gitflow copied to clipboard

Add setting for PR-style squash for feature and release branches

Open JustinGrote opened this issue 7 years ago • 4 comments
trafficstars

Hello,

Love the extension but currently having to squash feature branches before merging. A toggle setting in User Settings that would just add -S to the "finish" command would be great.

Proposed setting name: gitflow.squashBranchOnFinish

JustinGrote avatar Jul 01 '18 18:07 JustinGrote

I'm currently needing to squash commits before merging as well. Are there any plans to implement this?

sebastianmacias avatar Mar 11 '19 21:03 sebastianmacias

@JustinGrote @sebastianmacias do you guys still need this feature? what's your prefer/expectation on the merge action:

  • checkout develop branch, merge the feature branch with --squash (git merge --squash feature/name)
  • rebase the feature branch first with the command like: git rebase -i HEAD~3, then checkout the develop branch and merge with the default option

anhthang avatar May 13 '20 17:05 anhthang

I now use GitDoc + Github Issues and Requests which meets this need for me, and most repositories I work with now have master gated with branch policies so git flow doesn't work as well for me anymore since I can't commit directly to master.

https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gitdoc#collapsing-versions

To implement here, I'd recommend it be a git merge --squash --edit so that it pops up a vscode window that I can then edit the collapsed commit before closing and saving.

JustinGrote avatar May 13 '20 17:05 JustinGrote

glad to hear that you can resolve your issues and continue the works. your recommendation is my idea also. I have published a new version here with a setting to squash features during merge.

https://marketplace.visualstudio.com/items?itemName=buianhthang.gitflow

try it and give me comment if you have time

anhthang avatar May 28 '20 18:05 anhthang