Answer the question
In order to leave comments, you need to log in
How to make a git repository in a different directory?
Hello!
I want to make a GIT repository 1 level above the working directory of the project. I understand that most likely you need to dig towards the worktree, but something does not take off ((
For example, the working directory is /home/project/public_htm/, and the repository for it needs to be made in /home/project/git/
UPD - a solution was found: edit the .git/config file in the repository, specify the desired directory:
[core]
bare = false
worktree = /home/project/public_htm/,
Answer the question
In order to leave comments, you need to log in
a repository for it needs to be made in /home/project/git/
Dig towards GIT_DIR git-scm.com/book/en/v2/Git-Internals-Environment-V...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question