Skip to content

How to push changes from github to drupal.org without duplicated commits

Andrii Podanenko edited this page Mar 2, 2016 · 2 revisions

Welcome to the maintainer wiki!

Pushing changes to drupal.org

Example for dmaps module

git clone --branch 8.x-1.x [email protected]:project/dmaps.git
cd dmaps
git remote add github [email protected]:drupal-ukraine/dmaps.git
git fetch --all
git checkout github/8.x-1.x
git filter-branch --subdirectory-filter d8/modules/custom/dmaps HEAD
git checkout -b filtered
git log  # (Here you need to get latest commit HASH and first commit HASH not included to [email protected]:project/dmaps.git yet)
git checkout 8.x-1.x
git cherry-pick LATEST_HASH HASH_NOT_INCLUDED_TO_DRUPAL_ORG_REPO
git push origin 8.x-1.x