Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I create a Git repo in project source folder or at upper level [closed]

Tags:

git

Should I create a Git repo in project source folder or at upper level?

e.g.

Method 1

.git
project
project\foo.c
project\bar.c

Method 2 (under project folder)

.git 
foo.c
bar.c
like image 824
Ryan Avatar asked Oct 11 '22 06:10

Ryan


1 Answers

The goal of versioning a project is to get back (from any state of its history), an operational state able to reproduce what you were doing with said project.

So if you can copy a specific directory and still get back a fully functioning project (whatever that project is), use that as a criteria to create your .git within that directory.

like image 86
VonC Avatar answered Dec 28 '22 06:12

VonC