How do I rebase while skipping a particular commit?

Is there a way to rebase a branch onto another while skipping a particular (conflicting) commit on the other branch?

For example, I want to rebase mybranch onto master, but master contains a commit that will conflict with the commits in master, so I prefer to undo that commit completely.

-o-o-o-o-o-x-o-o-o-o master
     o-o-o-o mybranch

x marks the conflicting commit.


Use interactive rebase:

git rebase -i master

An editor will open and you will have a list of commits like this:

pick b8f7c25 Fix 1
pick 273b0bb Fix 2
pick 6aaea1b Fix 3

Just delete the commit you want to skip. It will be omitted while rebasing your branch onto master.

P.S. If you cannot see the editor, please, refer to this question for solution: How can I set up an editor to work with Git on Windows?

Need Your Help

SqlDataReader vs SqlDataAdapter: which one has the better performance for returning a DataTable?

c# performance datatable sqldatareader sqldataadapter

I want to know which one has the better performance for returning a DataTable. Here for SqlDataReader I use DataTable.Load(dr)

Get the client IP address using PHP

php ip-address

I want to get the client IP address who uses my website. I am using the PHP $_SERVER superglobal: