
I try to have a single commit to rename the files to keep the history. (2): GitHub uses a heuristic to determine, if a file is just renamed or delted+new. If anyone is interested how the rebase approach works, I can make something up and document it as a little blog post. I recommend to apply such a thing only in feature branches where so one else did build on the changed history. But keep in mind that this is a rewrite history and you can produce even more complex issue. P.s.: You can use rebase -i to split up the commits if it is not in recent history.

I hope this explanation is detailed enough. If you clone the repository and try this command out once in feature/rename and feature feature/delete-add you see that in the branch where the rename is lost only the last commit represents the history of the file. ( In the feature/rename )īut the important thing in git to follow the history of a file is the log command: GitHub only shows the rename properly if you review the specific commit. I've even had one of the maintainers of the repo try to give me a hand, but he ends up in the same predicament as I do.


Recovered the deleted file, source/libs/icons.js.So if you look at the comments in the PR (I link to the first one about renaming in there), you'll see that I've done the following in a few different was but here is the gist of it: I was asked to ensure it's renamed in Git so as to preserve the history. After playing around even a file 'a. On the command line I created a new branch, and created a file called 'ansible.cfg', but it doesn't show up when running git status. I'm working on a PR and I didn't realise at the time, but some files were committed as a deleted file (the original file) and a new file (the rename of the old file) when I renamed some of them. New file not showing up in git status Ask Question 3 I have forked and cloned a repository in order to contribute to it. Hey folks, I need a little help as I've kind of reached the extend of my gitfu.
