develooper Front page | perl.perl5.porters | Postings from March 2008

Re: Switching to Git

Thread Previous | Thread Next
From:
demerphq
Date:
March 6, 2008 23:33
Subject:
Re: Switching to Git
Message ID:
9b18b3110803062333u292f8358vfc5365fc894c51e3@mail.gmail.com
On 06/03/2008, Jonathan Rockway <jon@jrock.us> wrote:
> * 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

Why are these needed? I would have expected only

git init ; git add ; git commit -m'initial commit'

whats with the cd ../mkdir etc stuff? Thats some kind of non-standard
setup procedure isnt it? Why is it needed?

yves


>   $ 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
>


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About