Contributing to an individual Luggage feature requires a bit of setup before you are ready to create a pull request. You will need to fork the desired Luggage feature and create pull requests to the development branch from there. There exists already comprehensive documentation to help you understand Luggage's Git architecture. We will be following the same method as described there, but with an individual Luggage feature. So let's get started!
This doc assumes that you have a working build of either Luggage or Drupal installed. We will be using Luggage to demonstrate here. You will also need Git and Drush installed.
Step #1: Fork the Luggage Feature
- Find the Luggage feature you want to contribute to on Github.
- Click the "Fork" button to create your own copy of the repository.
After Github does magic you will now have your own working copy that you are able to push commits to!
Step #2: Switch the Remote
If you don't have a working installation of the Luggage feature you want to contribute to then you will need to install it before continuing, which has been explained elsewhere.
Now you need to navigate to the Luggage feature that you wish to edit. Typically, from the root of the site:
git status will yield the status of luggage_people. We can see that the luggage_people remote
origin is pointing at isubit's repo by:
git remote -v
To switch the remote we simply need to call the
set-url command on
git remote to change the url to your fork's url:
git remote set-url firstname.lastname@example.org:your_organization/luggage_people.git
Now you can pull any remote changes to your fork locally:
git pull origin master
Step #3: Get Setup To Contribute Any Changes
All pull requests should be against the
development branch so you first will need to switch to that branch:
git checkout -b development origin/development
This will create a branch locally named
development and track the remote
Now lets say that your intent is to change the order of the fields in a luggage_people profile, you will then need to create a branch off of
field_order, for example. You can name this branch anything you want, but it is best practice to describe the change you are making.
git checkout -b field_order
You can now make changes on this branch and come back to Step #4 when you are ready to create a pull request!
Step #4: Merge Changes
So you made some changes and want to contribute back to Luggage? All you need to to is merge them back to your
development branch and create a pull request to ISUBIT's Luggage feature.
To merge our
field_order branch, simply switch back to your
development branch, use
git merge, and then push those changes to your remote origin:
git checkout development git merge field_order git push origin development
Step #5: Create a Pull Request
All there is left to do is to create a pull request! Just go to Github and be sure to create the pull request from your
development branch to ISUBIT's
Thank you for contributing!