Imagine there is a GIT repository and I forked it to do custom features on it. As such, I have to relocate some files, yet maintain the reference of that file to the original repository so that if there are any updates happened I can merge it in mine without manual work
Asked
Active
Viewed 159 times
1 Answers
1
I don't think this is natively supported by Git or GitLab.
You would need a script to:
- fetch from the original repo
- rename the files (and change their content to reflect the new package name) in a dedicated branch
- merge that dedicated branch with yours in order to get the original repository file modifications.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
plus, I believe modern Git versions can track changesets across renamed files. – Nils Werner Nov 30 '20 at 08:55
-
@NilsWerner Yes, through the similarity index (https://stackoverflow.com/a/46258968/6309) – VonC Nov 30 '20 at 09:00