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. Push to the remote, and the PR shows that source/libs/icons.js has been deleted and source/libs/icons.tsx has been added. ![]() It may or may not know about the format of the NAS drives. The next commit is putting back the changes I had in source/libs/icons.tsx. Swinsian is apparently trying to write file names which are as compatible as possible.Push to the remote, and the PR shows it as a file rename with no file changes.Run a git mv source/libs/icons.js source/libs/icons.tsx.Deleted the new file, source/libs/icons.tsx.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. 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. Hey folks, I need a little help as I've kind of reached the extend of my gitfu. Swinsian rename podcast files Dying light trainer vac ban Do you need to convert gcm to iso Iphone 8 64gb auction Best nas for plex Search by typing & pressing enter.
0 Comments
Leave a Reply. |