Sometimes using Drupal.org issue forks you run into the situation that you'd like to start from scratch with the latest origin version. For example, you want to reset an old issue fork back to the 4.x origin and discard all changes in the issue fork.
This may, for example happen, if things were messed up or rebase didn't work as expected.
These are the steps you need to take. As our example we're using the drowl_header_slides moduel with the issue [#3309682]:
- # Regular steps to check out an issue fork
- # Example from drowl_header_slides module with issue #3309682:
- git clone --branch '4.x' firstname.lastname@example.org:project/drowl_header_slides.git
- cd drowl_header_slides
- git remote add drowl_header_slides-3309682 email@example.com:issue/drowl_header_slides-3309682.git
- git fetch drowl_header_slides-3309682
- git checkout -b '3309682-detect-parent-menu-items-by-trail' --track drowl_header_slides-3309682/'3309682-detect-parent-menu-items-by-trail'
- # Steps to reset the issue fork back to the origin 4.x implementation
- git fetch origin
- git checkout 4.x
- git checkout 3309682-detect-parent-menu-items-by-trail
- git reset --hard origin/4.x
- git push --set-upstream drowl_header_slides-3309682 HEAD --force
Now your issue fork is fresh, cleaned up and ready for coding again :)