Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rename a file on git and keep history

Is it possible to rename a file using Github desktop instead of using git shell and keep the history of it?

like image 465
Thanassis Avatar asked Dec 16 '15 11:12

Thanassis


1 Answers

git mv oldname newname

does exactly what you want.

EDIT: Point is that I don't think the github Desktop client lets you do that. To be honest, I see less and less usage for Github desktop, seeing that a) the website of github lets you do more things directly online in your fork on their servers, and b) git integration into almost any IDE is available and c) github desktop might hide a lot of the details of handling git, but it does the "wrong thing" in my humble opinion, not only taking away complexity, but adding confusion to the mix, and d) Github's own tutorial doesn't even mention it

like image 172
Marcus Müller Avatar answered Sep 21 '22 16:09

Marcus Müller