Mik378
Mik378

Reputation: 22171

Git / How to retrieve the files history after a simple "move files"

I had the A folder containing some files.
I decided to move the content of A to B, and then trash B.

I thought that IntelliJ would be able to do that cleanly regarding Git with the functionality: refactor => Move.

My job working, I decided to commit the whole and synchronize to github with git push origin master.

I just notice that my full history regarding the moved files has been dropped......

Is there any way to retrieve them? What should I have done to move cleanly?

I can see the full history of a specific file like this: git log --follow ./path/to/file

but how to attach them naturally?

The point is that I expect to see them on github.

Upvotes: 0

Views: 134

Answers (1)

Joseph K. Strauss
Joseph K. Strauss

Reputation: 4903

Since Git only stores logical snapshots, there is no reason to worry about how you moved the files. If your GUI cannot figure out that it was moved, that is a shortcoming of the GUI. I find the GUIs to be good at certain tasks, but not good at the more advanced techniques. It is best to have a good feel of how when the GUI can be helpful, but be completely comfortable with command line.

Upvotes: 1

Related Questions