User login

Git

Creating a patch with Git suitable for submitting to Drupal.org

Take the hash of a 'before' commit and the 'after' commit 'sha' hash and stay relative to the current directory and output a patch:

~/code/dgd7/drupal/sites/all/modules/views$ git diff --relative 5ac40a1 cb64d08 > 817748-views-book-hierarchy-sort-12.patch

If you've merely made the changes but not committed them you can use git diff > patch_name-1234-57.patch or if you've staged but not committed you can use git diff --cached patch_name-1234-57.patch.

Use Git to commit to CVS, such as for maintaining a Drupal module

UPDATE: See http://more.zites.net/git_drupal_contrib_cvs

Kathleen says this is complicated and not necessary - http://drupal.org/node/288873

HOWEVER-- if you ever want to let other people contribute to your project the normal way (if CVS can be considered in any way normal), then you will want the synch anyway.

Putting a local project maintained in git on a server as a central repository

Note: The agaric git repository is not public, but this approach will work on your own server.

Stefan explained: copy your folders to your home dir on the server, cd to /srv/git and then run git clone --bare folder folder.git

cd ~
scp -r customhome ben@grassrootsconnection.org:~/customhome

On the server:

ben@server:/srv/git/agaric$ git clone --bare ~/customhome customhome.git

Initialized empty Git repository in /srv/git/agaric/customhome.git/

And don't forget!

See your git commit history with files modified

Git log shows you all your commit messages and the revision hash, but often git log would be more useful showing files changed. (You should still try to write commit messages as if the reader will have no context except, at best, the project itself.)

git log --name-only -5

Checking the difference between a file modified locally and the repository with git

[done this before, never made a note of it]

git see difference between current and repository file

git diff

It's really that easy.

Additions in your local working copy are represented by + signs, subtractions by your local working copy are each preceded by a - sign.

http://media.pragprog.com/titles/tsgit/chap-005-extract.html

Helper script for deploying Drupal sites in Agaric's system

To get an agaric project repository, without the helper script, it's simply: git clone git.agariclabs.org:/srv/git/whoswho.git

And get the current version of the script at https://gitorious.org/agaric-scripts

File: 
File: 
Syndicate content