This page gives the essential Git commands for working with this project's source files.

  • Update Notice: See Git instructions updates for a record of updates to these instructions.
  • Last updated: April 26, 2012

One-Time Only

Setting up repository for the first time

git clone --recursive --branch master http://git.drupal.org/project/project_cvs_instructions.git
cd project_cvs_instructions
Not working for you? See Troubleshooting Git clone. Once it works, you need the Git deploy module. See Versioned dependencies and Git for an explanation.

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 running git 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

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 master

Creating a patch

For most improvements, use the following command after making your changes:
git diff > [description]-[issue-number]-[comment-number].patch
For more complex improvements that require adding/removing files, work over the course of multiple days including Git commits, or collaboration with others, see the Advanced patch workflow.

Applying a patch

Download the patch to your working directory. Apply the patch with the following command:
git apply -v [patchname.patch]
To avoid accidentally including the patch file in future commits, remove it:
rm [patchname.patch]

When you're done: Reverting uncommited changes

Revert changes to a specific file:
git checkout [filename]
Revert changes to the whole working tree:
git reset --hard

Maintainers for Project CVS instructions

  • dww - 3 commits
    last: 3 years ago, first: 3 years ago
  • David Strauss - 3 commits
    last: 3 years ago, first: 3 years ago

Issues for Project CVS instructions

To avoid duplicates, please search before submitting a new issue.
All issues
Bug reports