Answer the question
In order to leave comments, you need to log in
Interactive rebase. How to squash such commits?
There is a branch in which, for example, three commits:
1) They broke the encoding in file A
2) Normal edits on the code in file B
3) Corrected the encoding in file A
We need to squash all 3 commits. I do "git rebase production -i" and first I get a conflict on file A, with a bunch of conflicts on file due to encoding, and then there will be a reverse process. How to avoid it? (in real life I have 400 commits in a branch with this kind of crap and the customer wants an interactive rebase)
Answer the question
In order to leave comments, you need to log in
Well, not really great... but through
git reset HEAD~ // how many commits you need,
and then add the necessary changes and commit and push (--force most likely).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question