Search code examples
gitfilemergedocx

Git merging two different of a docx files



Me and a couple of friends are developing a website and our work is on git. We had the starting files there and from there we have changed some of them (.pdf and .docx) to new versions. However, instead of overriding them and later tracking the changes, everyone added new files. Now we have every single version of the documents in a different file, which defeats the purpose of version control. I want to maintain the history and dates when each files is added. Any way of doing that if they are in the same branch?
Thanks a lot


Solution

  • This will be hard work for you. The easiest way is to remove the files all together, then start committing them one by one according to history. each time you commit use

    git commit --date="Wed Feb 16 14:00 2011 +0100" -m "Whatever"
    

    this will be somewhat tedious though.

    Another option is to jump to each commit someone added a file, and open a branch there. Change the file name to the final name with git mv, then on the master branch merge the new branch in. This will make for a convoluted tree, but preserve history.