Is 'git --bare init' incorrect?

Is it git --bare initwrong?

Should it be:

git init --bare
+5
source share
3 answers

From a semantic point of view git init --bareit’s better: it --bareis connected with init, and not with all git.

+5
source

git --bare init is not wrong, it is just another way of expressing the same (errors, despite) work.

As a quick view of the git (1) toplex, the manpage is confirmed to --barebe a global option for all Git that affect repository directory detection:

   --bare
       Treat the repository as a bare repository. If GIT_DIR environment
       is not set, it is set to the current working directory.

Git " ", git --bare init /. --bare 1.5.6 CLI.

+19

to initialize the d git repository the best command i use is

git init --bare .

Before executing this command, make sure that you are inside your directory that you want to create a repository for.

+2
source

All Articles