Updated git documentation
authorEric Hayes <eric@inflection.com>
Tue, 3 Jul 2012 17:58:40 +0000 (13:58 -0400)
committerChris Price <chris@puppetlabs.com>
Fri, 19 Oct 2012 00:18:16 +0000 (17:18 -0700)
README.GIT.markdown

index b63d90b..6ddf99c 100644 (file)
@@ -53,6 +53,25 @@ For a specific revision or branch (can be a commit SHA, tag or branch name):
         source => 'git://example.com/repo.git',
         revision => 'development'
     }
+    
+Check out as a user:
+
+    vcsrepo { "/path/to/repo":
+        ensure => present,
+        provider => git,
+        source => 'git://example.com/repo.git',
+        revision => '0c466b8a5a45f6cd7de82c08df2fb4ce1e920a31',
+        user => 'someUser'
+    }
+
+Keep the repository at the latest revision (note: this will always overwrite local changes to the repository):
+
+    vcsrepo { "/path/to/repo":
+        ensure => latest,
+        provider => git,
+        source => 'git://example.com/repo.git',
+        revision => 'master',
+    }
 
 For sources that use SSH (eg, `username@server:...`)
 ----------------------------------------------------