1

A --> B --> C

C is a newer commit and A is an older commit.

I currently have A checked out. Is there a way to get the changes from C applied to my current state without getting the changes from B?

4
  • 2
    That's called a cherry-pick. Commented Oct 16, 2018 at 20:15
  • 1
    git help cherry-pick Commented Oct 16, 2018 at 20:18
  • If C built upon B, this is not likely going to go well for you. You'll have to graft the changes from C into A. Look at git replace, specifically the graft functionality. mirrors.edge.kernel.org/pub/software/scm/git/docs/… Commented Oct 16, 2018 at 20:19
  • 1
    @dev I've voted to close it as a duplicate of What does cherry-picking a commit with git mean?. It might be more useful to others to keep it instead of deleting it, so that searching for text like "apply changes from newer commit to older commit" will find this, which will point to the other question. Commented Oct 16, 2018 at 20:21

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.