Merge a branch from a different repository

I forked a repository from another one, simply taking the files and creating another repository. I was not interested in preserving history, as it would be a completely different project. As always happen, it was not the case. So today I had to merge a branch from the old repository in the new one. As you can understand, they have no common commits, so I had to pass the --allow-unrelated-histories flag to the merge command in git

$ git merge new_remote/my_branch --allow-unrelated-histories

Git Tip: show modified files between two commits

If you need the list of files that were modified between a commit and the latest one you can use git diff with the --name-only parameter:

git diff --name-only 360c150 HEAD

You can use the same command to show the modified files between two commits. Just replace HEAD with a commit hash:

git diff --name-only <commit1> <commit2>