Home  |  Linux  | Mysql  | PHP  | XML
From:Philip Potter Date:Tue Mar 16 09:10:37 2010
Subject:Re: Any Good SCM tool to manage Perl Code locally
On 16 March 2010 06:44, Parag Kalra <paragkalra@gmail.com> wrote:
>
> Just couple of questions - How can I make my code readonly using Git such
> that it can be edited only when it is checked out.

I don't understand the question. If you have source files, they are
necessarily part of the working copy and therefore they are checked
out. In git your working copy and your copy of the repository do have
a cosy relationship and live very near each other; but they are still
different things. The source files are part of the working copy. The
repository is not stored as individual source files -- it is stored in
hidden directories called .git/ and contains the database of all
revisions.

Since source files are always checked out, they could never be
readonly by your criteria.

> Also if I want to take entire code base to particular revision, I guess I
> need to use - 'git checkout <commit_name>'. So is commit name something like
> - '11666c32ad1008a88a603d7ebc5cea144495789e'

Yes that's right, but for convenience you can use a minimal unique
prefix rather than the whole checksum, so 11666c32 would probably work
in this instance. Normally however you would create a branch so you
can refer to it by name -- and catch further updates to that branch
pulled in from elsewhere -- rather than referring to a particular
commit. Then you just do 'git checkout branchname'.

I suggest further questions are taken to the git mailing list:
http://dir.gmane.org/gmane.comp.version-control.git
or to #git on irc.freenode.net

Phil
Navigate in group perl.beginners at sever nntp.perl.org
Previous Next


Your recent visits
running stats on a file
Re: Any Good SCM tool to manage Perl Code locally
Re: 1-line text file with numbers, need to add to them
Re: 1-line datafile, need data for another routine
Re: complex subroutine arguments



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants