User login

Sharing a complex Drupal patch for contributing to core, with git

Searched words: 
git says: You asked me to pull without telling me which branch you want to merge with, and 'branch..merge' in your configuration file does not tell me either.

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout drupal
cd drupal/
git init
git add *
git status
git add .htaccess
git commit -m 'first commit of unmodified current Drupal 7 head'
git remote add origin git@github.com:benjamin-agaric/drupal-taxonomy-as-fields.git
git push origin
patch -p0 < terms_as_fields.patch
git status
git commit -a -m "bangpound's proof of concept working fundamentals of getting CCK fields for terms and deprecating taxonomy_nodeapi"
git push

That worked.

There's a better way no doubt but the below works too.

rm -rf drupal/

Now proceed as someone else you added to your github repository and is contributing would do:

git clone git@github.com:benjamin-agaric/drupal-taxonomy-as-fields.git
cd drupal-taxonomy-as-fields/

Extra:
mvim .gitignore
and add the line .DS_Store !

(mvim is MacVim, substitute gvim or vi or the text editor of your choice, but then you wouldn't need to be removing the silly dsstore files if you weren't on a Mac.)

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.