1
I have 2 repositories:
/var/www/project
/var/www/project_disabled
I have a file in a specific folder within my repository project and I want to move this file with all its git history from the repository project to the repository project_disabled, How could I do that ? There’s a way ?
This would help me maintain the earlier versions of an older project that is more than 10 years old. and in case of error I could return with the file to the repository Official dinovo with all its history.
Why don’t you just delete that file? It will always be there in the repository if you want to go back and check its contents.
– Pablo Almeida
Interesting, but then we’ll have to start working another way, and it’ll be hard for people to agree to do it that way.
– Lucas Lima
Okay, but people are using Git wrong. The idea of versioning is not to have "folders". If the code is no longer useful for the project, the ideal is to remove it anyway, and the version control is there for, in case in the future you realize that it is useful, the information has not gone away forever. It is similar to using version control and still leave "commented" code snippets in case they become useful again. Goes against the idea of the tool.
– Pablo Almeida
I found a solution, but I fully agree with you the version control this one for this, the problem is that I’m practically a beginner in the company and at first when they came up with it I had no knowledge and no arguments for it. I’m going to apply the solution I found here and I’m going to alert the staff about what you said, Thank you!
– Lucas Lima