On 16 March 2010 06:44, Parag Kalra <paragka...@gmail.com> wrote: > Yes I have started using Git and I am very happy with it so far. > > 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 -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/