I recently downloaded an open-source project from github into my server using
$ git clone www.github.com/project_url
Then I added comments and descriptions inside the multiple files here and there. When I went to the github repository of the original project github page, many of the files were updated. But I'm hesitating to clone again because I think it would just overwrite every local files to which I wrote many of the comments.
Is there anyway I can download up-to-date files in the github, but leave the comments that I added not being removed at the same time?
There are multiple strategies to go around this problem. A strategy is already explained. Another could be
(git commit -am <message>)
(git pull -r)
Also, you can keep your changes separate in a separate branch. Here is what else can be done:
(git checkout -b <branch-name>, eg. git checkout -b new-branch)
(git commit -am <message>)
Either you can merge now from your new branch to the old branch
git checkout old-branch
; git merge new-branch
. OR