Early Bird Registration for DrupalCon Atlanta is now open! By registering during our Early Bird Registration window, you’ll save $100. This window ends on 19 January 2025 and will go by quickly, so don’t wait!
This page gives the essential Git commands for working with this project’s source files.
One-time only
Setting up repository for the first time
git clone https://git.drupalcode.org/sandbox/chriscalip-1240648.git
cd chriscalip-1240648
Routinely
The headings below are not sequential. What you choose to do depends on where you are in your process.Checking your repository status
To see what you will commit by runninggit commit
and what you could commit by running git add
before running git commit
.
git status
Switching to a different branch
When you clone the repository you have access to all the branches and tags. The first command shows your choices. The second command makes the switch. See branching and tagging for details.git branch -a
git checkout [branchname]
Patching
Contributing changes with patches is being replaced with issue forks and merge requests.
Getting ready to create or apply patches
If you have not already cloned the repository, follow the directions above for setting up this repository in your local environment. Be sure you are on the branch you wish to patch, then ensure it is up-to-date with the following command:git pull origin
Creating a patch
For most improvements, use the following command after making your changes:git diff > [description]-[issue-number]-[comment-number].patch
Applying a patch
Download the patch to your working directory. Apply the patch with the following command:git apply -v [patchname.patch]
rm [patchname.patch]
When you’re done: Reverting uncommited changes
Revert changes to a specific file:git checkout [filename]
git reset --hard