aboutsummaryrefslogtreecommitdiffstats
path: root/using-git.texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-08-15 01:26:35 +0200
committerMattias Andrée <maandree@operamail.com>2013-08-15 01:26:35 +0200
commitdae1dfd5461fa23c765b07f2d5f439e7cb58f6bf (patch)
tree4c838268f2c6fa7b41fe27ed90b95fff861c20b6 /using-git.texinfo
parentquite cleaning (diff)
downloadusing-git-dae1dfd5461fa23c765b07f2d5f439e7cb58f6bf.tar.gz
using-git-dae1dfd5461fa23c765b07f2d5f439e7cb58f6bf.tar.bz2
using-git-dae1dfd5461fa23c765b07f2d5f439e7cb58f6bf.tar.xz
create a respository
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--using-git.texinfo78
1 files changed, 77 insertions, 1 deletions
diff --git a/using-git.texinfo b/using-git.texinfo
index 1c4b640..ad81f4d 100644
--- a/using-git.texinfo
+++ b/using-git.texinfo
@@ -53,11 +53,87 @@ Texts. A copy of the license is included in the section entitled
@menu
-* GNU Free Documentation License:: Copying and sharing this manual.
+* Getting started::
+* GNU Free Documentation License::
@end menu
+@node Getting started
+@chapter Getting started
+
+@menu
+* Create a repository::
+@end menu
+
+
+
+@node Create a repository
+@section Create a repository
+
+A repository is a directory under source control,
+normally your project you are working on.
+
+Create an empty directory and @command{cd} into it:
+
+@example
+mkdir MY_PROJECT
+cd MY_PROJECT
+@end example
+
+When you are inside the directory for the repository
+issus the git command to initialise the repository:
+
+@example
+git init
+@end example
+
+This command creates a directory namend @file{.git}
+inside the directory with all data git requires to
+operate on the repository.
+
+The next thing you want to do is to create a
+@file{.gitignore} file, it is used to keep track
+of with files that should be be included in the
+repository, unless overruled with a forced staging.
+
+A good base @file{.gitignore} content you probably
+always want to use is:
+
+@example
+_/
+# It is a good idea to allow the directory _ to
+# contain temporary file you do not whant to stage.
+
+.*
+# Generally you probably do not want to include
+# hidden files.
+
+!.git*
+# But you do generally want to include files
+starting with .git, such as .gitignore.
+
+\#*\#
+*~
+*.bak
+# And you do not want to include backup files.
+@end example
+
+Git parses @file{.gitignore} with wildcards,
+@code{#} for comments and @code{!} for inclusion
+rather than exclusion, latter entires override
+earlier entries.
+
+When you have create you @file{.gitignore} you
+are ready to stage it and make your first commit:
+
+@example
+git add .gitignore
+git commit -n 'first commit'
+@end example
+
+
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texinfo