porton
porton

Reputation: 5801

Reversing branch differences (Git)

Suppose the branch dev was forked from master, edited and then merged back into branch master.

Now I need to get the latest snapshot of the repo of master minus changes from dev. How?

Upvotes: 0

Views: 36

Answers (1)

tmaj
tmaj

Reputation: 35037

master minus changes from dev

This can mean different things.

Here are two possibilities

Master without a special commit

You could checkout current master, create a feature branch and revert the commit from dev.

Just the difference

You could just compare the branches with git diff.

Master from the moment before dev was merged in

git checkout master commit_before_the_merge_commit.

You can find commit_before_the_merge_commit with git log.

Upvotes: 1

Related Questions