Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make github follow directory history after renames?

Tags:

github

Once a directory is renamed, "git log" no longer shows its history, unless you force it to, by using "git log --follow".

Is there a way to force the "history" function on the GitHub web UI to use "--follow"?

Alternatively - is there any way to see pre-rename history on GitHub?

like image 296
Guy Avatar asked Apr 13 '11 08:04

Guy


People also ask

How do I rename a directory in git without losing history?

emiller/git-mv-with-history. git utility to move/rename file or folder and retain history with it. # git-mv-with-history -- move/rename file or folder, with history. # Git has a rename command git mv, but that is just for convenience.

How does git track history?

Git stores history as a graph of snapshots of the entire repository. These snapshots, called commits in Git, can have multiple parents, creating a history that looks like a graph instead of a straight line.

In which folder git commit history is maintained?

Git stores the complete history of your files for a project in a special directory (a.k.a. a folder) called a repository, or repo. This repo is usually in a hidden folder called . git sitting next to your files.


1 Answers

This was requested in 2009 (Request 129), and then in 2010 (Request 897), and then in 2021 (github/feedback discussion 6964):

I like this.
There could be other issues preventing us from plopping the --follow argument in.
I'll take a look and let you know.

... and then nothing for now.


Note: Git 2.6+ (Q3 2015) will propose that in command line: see "Why does git log not default to git log --follow?"


Note: Git 2.6.0 has been released and includes this feature. Following path changes in the log command can be enabled by setting the log.follow config option to true as in:

git config log.follow true 
like image 169
VonC Avatar answered Oct 07 '22 05:10

VonC