Skip to content

Instantly share code, notes, and snippets.

@willthames
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willthames/afbaaab0c9681ed45619 to your computer and use it in GitHub Desktop.
Save willthames/afbaaab0c9681ed45619 to your computer and use it in GitHub Desktop.
Recreating pull requests from ansible to ansible-modules-core
git checkout branch_containing_your_commit
git rebase f35ed8a6c0dc81 # last commit before the removal of library modules
git format-patch f35ed8a6c0dc81 --stdout > /tmp/patchname.patch
git checkout devel
cd lib/ansible/modules/core/
git checkout -b branch_for_new_pull_request 417309a626 # this is before the module renames
git am -p2 /tmp/patchname.patch # -p2 here strips off the leading directory (in most cases, library)
git rebase devel
git push your_remote_for_your_fork branch_for_new_pull_request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment