0

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.

Mik378
  • 21,881
  • 15
  • 82
  • 180
  • *What should I have done to move cleanly?* I don't know about IntelliJ, but at the command line, the right thing to do is `git mv `. – jub0bs Jan 06 '15 at 00:43
  • Yes, I've read about this command few hours ago. – Mik378 Jan 06 '15 at 00:44
  • possible duplicate of [Lost git history after reorganizing project folder](http://stackoverflow.com/questions/4176784/lost-git-history-after-reorganizing-project-folder) – John Zwinck Jan 06 '15 at 01:04

1 Answers1

1

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.

Joseph K. Strauss
  • 4,683
  • 1
  • 23
  • 40