I have a project directory, for example / projects / myProject / src / ... and my git repository is in the / projects / myProject / src directory. But I want to change my main git directory to / projects / myProject (which is the parent of the current git directory). I could just create a new repo in / projects / myProject, but I could lose all my previous commits. Is there a way to change my directory without losing my commit data?
source
share