summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cf2999e)
raw | patch | inline | side by side (parent: cf2999e)
author | Nicolas Pitre <nico@cam.org> | |
Sun, 7 Jan 2007 17:31:29 +0000 (12:31 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Mon, 8 Jan 2007 02:03:07 +0000 (18:03 -0800) |
Make "init" the equivalent of "init-db". This should make first GIT
impression a little more friendly.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
impression a little more friendly.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index 2105a3d2e7337105263c8a9fef466609c63fc163..4e83994c588fc5f4853abc3839378281c58c9253 100644 (file)
Everybody uses these commands to maintain git repositories.
- * gitlink:git-init-db[1] or gitlink:git-clone[1] to create a
+ * gitlink:git-init[1] or gitlink:git-clone[1] to create a
new repository.
* gitlink:git-fsck-objects[1] to check the repository for errors.
------------
$ tar zxf frotz.tar.gz
$ cd frotz
-$ git-init-db
+$ git-init
$ git add . <1>
$ git commit -m 'import of frotz source tree.'
$ git tag v2.43 <2>
index ca7d09dc0a8563a1d8005bc83a89d19c785c1a3d..bc3ba14939054657bd82b8e3a8eb876e26ff14b0 100644 (file)
things that are already there. The primary reason for rerunning `git-init-db`
is to pick up newly added templates.
+Note that `git-init` is the same as `git-init-db`.
EXAMPLES
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 36b2126d847bf86f9efe5bdb1ce88acef9046633..5662cdc27cb35786e72dcf9c0db74009a3cba4aa 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
gitlink:git-index-pack[1]::
Build pack idx file for an existing packed archive.
+gitlink:git-init[1]::
gitlink:git-init-db[1]::
Creates an empty git object database, or reinitialize an
existing one.
index 60e54777dc6cef259a045512f42a50527f430fb9..f48894c9a25001374210fba3f6782ccec996a664 100644 (file)
------------------------------------------------
$ mkdir test-project
$ cd test-project
-$ git init-db
+$ git init
Initialized empty Git repository in .git/
$ echo 'hello world' > file.txt
$ git add .
index 01d4a47a97fa864c6948b8ae98ece1f00b1003da..d2bf0b905aa3f2b67f781310b9f60c05fa948c67 100644 (file)
------------------------------------------------
$ tar xzf project.tar.gz
$ cd project
-$ git init-db
+$ git init
------------------------------------------------
Git will reply
diff --git a/Makefile b/Makefile
index 5c712b94c11e3fb87f50c648932ecc4e7add409a..d2a838276099c65ec7a45b4abd40ce614456c1df 100644 (file)
--- a/Makefile
+++ b/Makefile
BUILT_INS = \
git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
- git-get-tar-commit-id$X \
+ git-get-tar-commit-id$X git-init$X \
$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
# what 'all' will build and 'install' will install, in gitexecdir
diff --git a/builtin-init-db.c b/builtin-init-db.c
index 97fd82ff0664aa9a79cf1ace20dac1a5c0064743..bbef820e478dd91cfe63431adf3cecc30e437416 100644 (file)
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
}
static const char init_db_usage[] =
-"git-init-db [--template=<template-directory>] [--shared]";
+"git-init [--template=<template-directory>] [--shared]";
/*
* If you want to, you can share the DB area with any number of branches.
index c82ca458e47186cd926dc83030cb7a6c8a697e8d..bf55499dc3d555dfaa853b0c6e4aec5439c3532e 100644 (file)
--- a/git.c
+++ b/git.c
{ "get-tar-commit-id", cmd_get_tar_commit_id },
{ "grep", cmd_grep, RUN_SETUP },
{ "help", cmd_help },
+ { "init", cmd_init_db },
{ "init-db", cmd_init_db },
{ "log", cmd_log, RUN_SETUP | USE_PAGER },
{ "ls-files", cmd_ls_files, RUN_SETUP },