savannah-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-cvs] [61] Update to current git syntax and methods.


From: Bob Proulx
Subject: [Savannah-cvs] [61] Update to current git syntax and methods.
Date: Sun, 12 Jan 2014 04:47:17 +0000

Revision: 61
          http://svn.sv.gnu.org/viewvc/?view=rev&root=administration&revision=61
Author:   rwp
Date:     2014-01-12 04:47:14 +0000 (Sun, 12 Jan 2014)
Log Message:
-----------
Update to current git syntax and methods.

Specifying GIT_DIR is no longer needed if cd'd into the directory
now.  This simplifies the description quite a bit.  Mark the
git-cvsserver section as optional since many projects are now coming
from svn and bzr.  Update to current server paths.  Other minor
improvements.

Modified Paths:
--------------
    trunk/sviki/Git.mdwn

Modified: trunk/sviki/Git.mdwn
===================================================================
--- trunk/sviki/Git.mdwn        2014-01-12 04:47:06 UTC (rev 60)
+++ trunk/sviki/Git.mdwn        2014-01-12 04:47:14 UTC (rev 61)
@@ -6,24 +6,26 @@
 git-core is backported on a regular basis using the procedure in
 infra/git.txt.  Keep it up-to-date.
 
-Repositories are in /subsystems/cvs/srv/git/project\_name.git for now.
+Repositories are in /srv/git/project\_name.git for now.
 git+ssh is supported in Savane's sv\_membersh (delegates to git-shell).
 The git:// lightweight protocol is also available, check
-etc/xinetd.d/git.
+/etc/xinetd.d/git.
 
 Creating an additional repository
 ---------------------------------
 
-first, make a directory to place additional repositories:
+If a project wishes to have several repositories grouped together
+under the same project name.
 
+make a directory to place additional repositories:
+
     mkdir /srv/git/lwip
-    chgrp -R lwip /srv/git/lwip
+    chgrp lwip /srv/git/lwip
     chmod g+s /srv/git/lwip
 
-create new repository:
+create a new shared bare repository in that directory:
 
-    GIT_DIR=/srv/git/lwip/lwip-contrib.git git init --shared=all
-    chgrp -R lwip /srv/git/lwip/lwip-contrib.git
+    git init --shared=all --bare /srv/git/lwip/lwip.git
 
 write following to: /srv/git/lwip/lwip-contrib.git/hooks/post-update:
 
@@ -36,14 +38,17 @@
 
 forbid access to hooks:
 
-    chown -R root: /srv/git/lwip/lwip-contrib.git/hooks
+    chown -R root:root /srv/git/lwip/lwip-contrib.git/hooks
     chattr +i /srv/git/lwip/lwip-contrib.git/hooks
 
-add 'git-cvsserver' support:
+add 'git-cvsserver' support (optional, if requested):
+(Is the git-cvsserver still desirable?  I think not if the project is
+coming from svn or bzr.)
 
-    GIT_DIR=/srv/git/lwip/lwip-contrib.git git config gitcvs.pserver.enabled 1
-    GIT_DIR=/srv/git/lwip/lwip-contrib.git git config gitcvs.ext.enabled 0
-    GIT_DIR=/srv/git/lwip/lwip-contrib.git git config gitcvs.dbname 
"%G/gitcvs-db/sqlite"
+    cd /srv/git/lwip/lwip-contrib.git
+    git config gitcvs.pserver.enabled 1
+    git config gitcvs.ext.enabled 0
+    git config gitcvs.dbname "%G/gitcvs-db/sqlite"
     mkdir /srv/git/lwip/lwip-contrib.git/gitcvs-db -m 755
     chown nobody /srv/git/lwip/lwip-contrib.git/gitcvs-db
 
@@ -85,7 +90,7 @@
 This needs some rationale and justification because during normal
 operation we never want to rewind a branch.  It causes problems for
 anyone who has pulled from the branch.  Normally branches only move
-forward. But sometimes renaming a branch is the best solution to a
+forward.  But sometimes renaming a branch is the best solution to a
 problem.
 
 Sometimes a user has munged a commit, has pushed the desired branch onto
@@ -94,21 +99,22 @@
 
 Verify the current and future state of the repository:
 
-    GIT_DIR=/srv/git/exampleproject.git git branch
-    GIT_DIR=/srv/git/exampleproject.git git log
-    GIT_DIR=/srv/git/exampleproject.git git log new-master
+    cd /srv/git/exampleproject.git
+    git branch -l
+    git log
+    git log new-master
 
-Save the current branch for a for backup:
+Move the current branch to master-broken as a backup save:
 
-    GIT_DIR=/srv/git/exampleproject.git git branch -m master master-broken
+    git branch -m master master-broken
 
 Move the new branch into place as master:
 
-    GIT_DIR=/srv/git/exampleproject.git git branch -m new-master master
+    git branch -m new-master master
 
 At this time the "current" branch will be shown to be master-broken:
 
-    GIT_DIR=/srv/git/exampleproject.git git branch
+    git branch -l
       master
     * master-broken
 
@@ -119,11 +125,11 @@
 is now set to master-broken and needs to be updated to point to master.
 Since this is a raw repository update the HEAD file directly:
 
-    echo ref: refs/heads/master > /srv/git/exampleproject.git/HEAD
+    echo ref: refs/heads/master > HEAD
 
 Verify the current status us as desired:
 
-    GIT_DIR=/srv/git/exampleproject.git git branch
+    git branch -l
     * master
       master-broken
 
@@ -131,7 +137,7 @@
 around for a while than to remove it too soon and lose something that
 should not have been lost.  Then clean up and discard the broken branch:
 
-    GIT_DIR=/srv/git/exampleproject.git git branch -D master-broken
+    git branch -D master-broken
 
 Task List
 ---------




reply via email to

[Prev in Thread] Current Thread [Next in Thread]