Search code examples
gitdockerrepositorycloneproject

Recommendation when cloning an external (remote) repository


I want to set up a git project to maintain the configuration for a complete docker stack for symfony applications (dockerfiles, yml's, etc.). I want to use an external project from Github and use that as a basis to modify it further to fit the needs of my applications, for example switch the docker config for a mysql database to postgres or adding other containers.

Now I am wondering how to proceed with the commit history of the cloned project, wether I should just clone the project and work locally on top of the past commits or initiate a new repo in the project directory.

Is there any best practice regarding that issue or is it even allowed?


Solution

  • This depends on how you plan to go further with this project. If you consider adding something to the remote repository in the future, you should fork it and then work in a new feature branch. Of course, you would have to keep the past commit history.

    If you basically just need the files and you want to work mainly locally, it doesn't matter. You could download a ZIP file and do anything you want with the files. This is absolutely legit.

    What I'm not sure about is what applies if you plan to use certain parts in a commercial environment, but that depends very much on the project.