This is what I've done in my local git repository:
git checkout -b temp
// made some changes
git commit -am "Fix button color"
// made some changes
git commit -am "Fix button shadow"
git revert bda326fd1
git merge master
// fix conflicts
// made some changes
git commit -am "Fix button size"
Now, git log --oneline
gives me this:
0da44b017 (HEAD -> temp) Fix button size
b54f819ed Merge branch 'master' into temp
66a6de811 Revert "Fix button shadow"
bda326fd1 Fix button shadow
d467f28f4 Fix button color
Now, before pushing changes to remote, I would like to completelly remove theese commits:
66a6de811 Revert "Fix button shadow"
bda326fd1 Fix button shadow
I wanted to use git rebase
to drop
theese 2 commits, but after doing: git rebase -i HEAD~5
I got an error:
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
It want me to fix conflict, that was already fixed in past. Why does that happen? It was fixed waaay before my work I've talked above.