I used git checkout
to pull a file from a certain branch on Git, and made the small modified changes to it. However, I don't know how to add the changes without adding the whole file.. meaning that I am using git add
to add the file I just modified.. However when I used git commit
, and then git show <commit-id>
to see the changes.. every time they rewrite the whole file as insertions, instead of showing insertions, deletions.
Basically how do I add my modification to a file without having to insert the entire file? (I am trying to push a commit to a existing pull request on GitHub and I don't think it's wise to rewrite, and push a entire new file instead of just the small changes)
Please advise