aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-15 01:46:11 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-15 01:46:11 +0200
commita66b89c131b55f304ca4e66ba9fa289c71b848d0 (patch)
tree221b9b28153eb276d14a836b752e7ac75ec63529
parentmissed to removed that (diff)
downloadusing-git-a66b89c131b55f304ca4e66ba9fa289c71b848d0.tar.gz
using-git-a66b89c131b55f304ca4e66ba9fa289c71b848d0.tar.bz2
using-git-a66b89c131b55f304ca4e66ba9fa289c71b848d0.tar.xz
creating an origin
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--using-git.texinfo37
1 files changed, 37 insertions, 0 deletions
diff --git a/using-git.texinfo b/using-git.texinfo
index 7373706..4388f0b 100644
--- a/using-git.texinfo
+++ b/using-git.texinfo
@@ -61,6 +61,7 @@ Texts. A copy of the license is included in the section entitled
@menu
* Create a repository::
+* Create an origin::
@end menu
@@ -131,6 +132,42 @@ git commit -n 'first commit'
+@node Create an origin
+@section Create an origin
+
+It is a good idea to create a backup repostory,
+so you do not lose your work on a disc failure,
+filesystem corruption accidental removal.
+
+You can such repostory for allowing collaboration
+with a command repository that the collaborators
+can all submit and fetch commits from.
+
+This repository is customarly called `origin'.
+And it is a bare repository, meaning that it
+only hold the data in the @file{.git} directory
+and cannot be used as the working directory.
+
+@example
+mkcd -p /srv/git/MY_REPOSITORY.git
+cd /srv/git/MY_REPOSITORY.git
+git init --bare
+
+cd - # Go back to your project respository
+git remote add origin file:///srv/git/MY_REPOSITORY.git
+git push -u orgin master # master is the bransh you are working in
+@end example
+
+It is standard to append @file{.git} to the
+end of the repository name when it is bare.
+
+To submit your changes to origin you can now
+use the command @command{git push}. To fetch
+updates others have made, use the command
+@command{git pull}.
+
+
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texinfo