Front page | perl.perl5.porters |
Postings from March 2008
Re: Switching to Git
Thread Previous
|
Thread Next
From:
Jonathan Rockway
Date:
March 6, 2008 13:59
Subject:
Re: Switching to Git
Message ID:
87bq5r1r7n.fsf@bar.jrock.us
* On Thu, Mar 06 2008, Sam Vilain wrote:
>> 1) there are lots of "cheat sheets" floating around about how to use
>> git tools - I think this is evidence that [...] many
>> people have to write "GIT for mortals" pages.
>
> Well, people write programming cookbooks for Perl, too. It's a flexible
> tool that just oozes TIMTOWTDI. It doesn't have a One True Workflow™,
> so people write the commands which suits their workflow and project. I
> think once you grok it you'll find it's not so bad.
Once common perl-specific workflows emerge, it will be easy to write
some utilities to make the work as easy as possible. The good thing
about git's modularity is that writing quick scripts is trivial. svn
doesn't have that ability really (not enough guts exposed, although some
sugar on top of Svn::Ra and friends could help that).
As an example of automating git, I found this pattern for creating a new
module and pushing to my git server rather tedious:
$ catalystx-starter My::Module
$ cd My-Module
$ git init
$ mv gitignore .gitignore
$ git add .gitignore *
$ git ci -m 'initial commit'
$ cd ..
$ mkdir My-Module.git
$ cd My-Module.git
$ git --bare init
$ git --bare fetch ../My-Module master:master
$ touch git_daemon_export_ok
$ echo "A description of my project" > description
$ cd ..
$ scp -r My-Module.git my-server:/git
$ rm -rf My-Module.git My-Module
$ git clone ssh://my-server/git/My-Module.git
$ cd My-Module # finally I can start hacking
So, I wrote a very very quick Perl script to sugar this up:
http://git.jrock.us/?p=jrockway-utils.git;a=blob;f=bin/catgit.pl;hb=HEAD
Anyway, just a git anecdote I thought I'd share.
Regards,
Jonathan Rockway
Thread Previous
|
Thread Next