You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix branches / PRs when the repo directories are re-arranged
Example:
PR out that makes changes in packages/frontend/
but upstream changes moved that directory to client/web/emberclear/
normally, there would be a ton of conflicts if the PR submitter were to try to rebase.
To fix the conflicts issue, and re-write the diffs to apply to the correct directories:
git checkout your-branch
# squash down to one commit, or format-patch will make a diff file for each commit## remember the additions/deletions
git diff HEAD~1 --shortstat
# this will output a file like 0001-commit-message-here.patch
git format-patch HEAD~1
git checkout master
# create new branch (don't want to destroy original branch yet)
git checkout -b your-branch-2
# now apply the diff
git apply -p3 --directory="client/web/emberclear" 0001-commit-message-here.patch
git commit -am"some new message"# this should be *roughly* close to the original diff, # depending on what's changed in the upstream branch# ideally, the diff stats here match those from earlier
git diff HEAD~1 --shortstat
No description provided.
The text was updated successfully, but these errors were encountered: