Let's say that I have 2 files:
App.js
Home.js
They are already tracked and exist in first commit. And I add a new feature to App.js
on second commit which is maybe a new function and have more commits afterwards and let's say I'm in 10th commit now.
What I would like to do is just remove that function in a new commit without rebasing only in App.js
; what should I do in order to achieve this?
Edit
Function is a simple example it's pretty easy to delete those lines and have a new commit. What I want is something more smart and does not need a manual effort. I use VS Code and the GitLens extension; it would be great if there is feature on these tools.