Don Rhummy Don Rhummy - 1 year ago 82
Git Question

After moving files/directories, GitHub shows no history for the files but Git does - is this due to how I moved them?

We have a repo where we had a directory structure like:


We then moved the files to be like:


After doing this and pushing the changes, on GitHub, when i view "history" for any of the files, it shows only today.

However, when I'm in IntelliJ and choose
git->Show History
on any file, it shows all their history (back to last year).

Is there a way to fix this? Do i need to move/commit file moves in a special way for git/GitHub to see them with full history?

Answer Source

By default, IntelliJ will show the full history (git log --follow) which follows file moves (even though the graphic version of that log is still buggy)

However, GitHub cannot do the same (for performance reason), and only shows the history for file without their prior location history.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download