[ git ] revert PR, then move all the PR branch content to the new branch

  1. Create patch file that contains a diff between 2 branch
git diff develop..link-to-category-page > link-to-category-page.patch

2) Create new branch and apply patch to new branch

git apply link-to-category-page.patch

 

ref : https://gist.github.com/patkujawa-wf/9960173

, https://stackoverflow.com/questions/24922094/taking-a-git-diff-and-creating-a-new-branch-in-different-repo/24922587#comment38724313_24922094

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s