3

Can someone describe on how to contribute the D8 version of an existing D7 contrib project? I maintain the D7 project, and further want to add the D8 version of it.

I am struggling with creating 8.x.1.x Dev branch.

Please share any references or steps to follow.

My Project link: Check DNS.

So when I create 8.x.1.x branch, I can see Drupal 7 specific files within that, so I am confused that how should I manage set of files for D8 and D7.

2

You can use Browse code repository to see your source code on your project page. Currently when you go to list of branches, the 8.x-1.x doesn't exist yet.

To maintain both D7 and D8, you need to have one branch for each, 7.x-1.x for Drupal 7, and 8.x-1.x for Drupal 8.

To create Drupal 8 out of Drupal 7 version, you should first clone your repository as per these Git instructions:

git clone --branch 7.x-1.x your_user@git.drupal.org:project/check_dns.git

then create a new branch:

git checkout -b 8.x-1.x

which allows you to freely modify your files for Drupal 8 version.

Once you did your conversion, you can push your branch back to Drupal.org, e.g.

git push origin 8.x-1.x

To switch between branches, use git checkout command, so you can contribute to both version.

Ideally, you should read more about managing source code using Git. Checkout this GitHub Cheat Sheet.

  • 1
    Done, thanks. I can't believe that how foolish I was and just overlooked it. I was using 'ls' command for listing the files in branches :P – echo Dec 13 '17 at 12:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.