Reputation: 4867
Note: I am relatively new to Git / GitHub. I understand my way around, but I am confused with this corner case
I created an IntelliJ color scheme git repo and pushed it to github online. The directory structure was ad hoc and made up of only output
. This was actually fine and worked well.
I noticed that people would not get updates from me this way, and decided to create a JetBrain Repo plugin. This also works well; however, my github location and plugin location on my PC are different.
I looked over Change Git repository directory location. but was not sure if this fit my usecase.
Since my github is just output files
and my plugin files are all input files
, can I simply just copy over my .git
files (along with README files and such) , and expect it to work correctly?
The linked SO question seems to relate to JUST moving the same directory structure and files over to another location. I am dealing with different directory structure, different files, and directory location; however, it IS the same project.
Update
Before, my workflow was:
\Documents\GitHub\ChroMATERIAL
\Documents\GitHub\ChroMATERIAL
mergeNow it is
\IdeaProjects\ChroMATERIAL
\Documents\GitHub\ChroMATERIAL
\Documents\GitHub\ChroMATERIAL
mergeWhat I want
\IdeaProjects\ChroMATERIAL
\IdeaProjects\ChroMATERIAL
mergeUpvotes: 0
Views: 390
Reputation: 332
I'm assuming that the generated output matches the structure you need for your Github repository. If so you could easily move your .git folder from \Documents\Github\ChroMATERIAL to \IdeaProjects\ChroMATERIAL
What you should check:
Will the generated output directory be cleared if you clean the project into Intellij? If so you should stick to your current workflow since you could easily delete your local copy.
The other thing which could be a problem is the Github Desktop Client since I don't know how it behaves nor how or if it must be configured in a special way to reflect your changes. (if you just call it from the inside of the repository it should not be a problem at all)
For your explanation: Git uses relative paths. So it is irrelevant where the repository lives inside your system. The important part is the structure inside the repository since this will be cloned to the remote repository.
I recommend that you copy your .git folder rather than move it. If something goes wrong you can easily revert.
Upvotes: 2