0

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

smarber
  • 4,829
  • 7
  • 37
  • 78
C. Lewis
  • 145
  • 1
  • 6
  • 17

0 Answers0