Skip to content

Commit 515377e

Browse files
Nicolas PitreJunio C Hamano
authored andcommitted
"init-db" can really be just "init"
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>
1 parent cf2999e commit 515377e

File tree

8 files changed

+9
-6
lines changed

8 files changed

+9
-6
lines changed

Documentation/everyday.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Basic Repository[[Basic Repository]]
2525

2626
Everybody uses these commands to maintain git repositories.
2727

28-
* gitlink:git-init-db[1] or gitlink:git-clone[1] to create a
28+
* gitlink:git-init[1] or gitlink:git-clone[1] to create a
2929
new repository.
3030

3131
* gitlink:git-fsck-objects[1] to check the repository for errors.
@@ -107,7 +107,7 @@ Use a tarball as a starting point for a new repository.::
107107
------------
108108
$ tar zxf frotz.tar.gz
109109
$ cd frotz
110-
$ git-init-db
110+
$ git-init
111111
$ git add . <1>
112112
$ git commit -m 'import of frotz source tree.'
113113
$ git tag v2.43 <2>

Documentation/git-init-db.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ Running `git-init-db` in an existing repository is safe. It will not overwrite
7474
things that are already there. The primary reason for rerunning `git-init-db`
7575
is to pick up newly added templates.
7676

77+
Note that `git-init` is the same as `git-init-db`.
7778

7879

7980
EXAMPLES

Documentation/git.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ gitlink:git-hash-object[1]::
353353
gitlink:git-index-pack[1]::
354354
Build pack idx file for an existing packed archive.
355355

356+
gitlink:git-init[1]::
356357
gitlink:git-init-db[1]::
357358
Creates an empty git object database, or reinitialize an
358359
existing one.

Documentation/tutorial-2.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Let's start a new project and create a small amount of history:
1717
------------------------------------------------
1818
$ mkdir test-project
1919
$ cd test-project
20-
$ git init-db
20+
$ git init
2121
Initialized empty Git repository in .git/
2222
$ echo 'hello world' > file.txt
2323
$ git add .

Documentation/tutorial.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ can place it under git revision control as follows.
3232
------------------------------------------------
3333
$ tar xzf project.tar.gz
3434
$ cd project
35-
$ git init-db
35+
$ git init
3636
------------------------------------------------
3737

3838
Git will reply

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ EXTRA_PROGRAMS =
210210

211211
BUILT_INS = \
212212
git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
213-
git-get-tar-commit-id$X \
213+
git-get-tar-commit-id$X git-init$X \
214214
$(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
215215

216216
# what 'all' will build and 'install' will install, in gitexecdir

builtin-init-db.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static int create_default_files(const char *git_dir, const char *template_path)
259259
}
260260

261261
static const char init_db_usage[] =
262-
"git-init-db [--template=<template-directory>] [--shared]";
262+
"git-init [--template=<template-directory>] [--shared]";
263263

264264
/*
265265
* If you want to, you can share the DB area with any number of branches.

git.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ static void handle_internal_command(int argc, const char **argv, char **envp)
231231
{ "get-tar-commit-id", cmd_get_tar_commit_id },
232232
{ "grep", cmd_grep, RUN_SETUP },
233233
{ "help", cmd_help },
234+
{ "init", cmd_init_db },
234235
{ "init-db", cmd_init_db },
235236
{ "log", cmd_log, RUN_SETUP | USE_PAGER },
236237
{ "ls-files", cmd_ls_files, RUN_SETUP },

0 commit comments

Comments
 (0)