summaryrefslogtreecommitdiff
path: root/doc/bare_repositories.mdwn
diff options
context:
space:
mode:
authorGravatar Valentin_Haenel <Valentin_Haenel@web>2011-11-04 23:19:13 +0000
committerGravatar admin <admin@branchable.com>2011-11-04 23:19:13 +0000
commit502f86604fd90d6f52236b38612a39ec6e713be7 (patch)
tree764a20e1c45e085b26cd19e5830d4ac37e9a572e /doc/bare_repositories.mdwn
parentdabb6a9f265d8babd8885806bf5475a901bdbd90 (diff)
a recipe for setting up a bare remote
Diffstat (limited to 'doc/bare_repositories.mdwn')
-rw-r--r--doc/bare_repositories.mdwn24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/bare_repositories.mdwn b/doc/bare_repositories.mdwn
index 3bc0a22cb..bf56d8144 100644
--- a/doc/bare_repositories.mdwn
+++ b/doc/bare_repositories.mdwn
@@ -18,3 +18,27 @@ as non-bare repositories. Except for these caveats:
branches that have been pushed to the bare repository. So use it with care..
* Commands that need a work tree, like `git annex add` won't work in a bare
repository, of course.
+
+***
+
+Here is a quick example of how to set this up, using `origin` as the remote name, and assuming `~/annex` contains an annex:
+
+On the server:
+
+ mkdir bare-annex
+ git init --bare
+ git annex init origin
+
+Now configure the remote and do the initial push:
+
+ cd ~/annex
+ git remote add origin example.com:bare-annex
+ git push origin master git-annex
+
+Now `git annex status` should show the configured bare remote. If it does not, you may have to pull from the remote first (older versions of `git-annex`)
+
+If you wish to configure git such that you can push/pull without arguments, set the upstream branch:
+
+ git branch master --set-upstream origin/master
+
+