Reputation: 5805
I've set up my repository in Git. I can commit to it just fine and dandy.
However, when I make changes to my files (git status shows modifications), and I want to pull my repository and overwrite those files that have been changed (just as a test to see if I'm updating my local side correctly), it tells me that my local repo is "Already up-to-date".
From my understanding, I've made changes to my local so it shouldn't be telling me that my local is "up-to-date".
Now the question is, is Git telling me this because I am the same user that last committed to the repo? So if I were, for example, to commit something using my roommate's username, then if I were to pull from mine after his commit, then my local files would be updated?
I know that there are reset commands and revert commands in case that you screwed up or want to revert to your old files on YOUR machine, which is why I think that me being 'the same user' is the problem. Git just doesn't want to pull from the repo because I can reset my changes locally?
Am I on the right track with committing on different users to ACTUALLY pull from the repo?
P.S. - I did set my e-mail and username using the git config --global command (should I have used --local or --system?). Might that be another cause of the problem?
Upvotes: 1
Views: 1135
Reputation: 2097
If there is no new conmit in the repo that "touches" the files you have modified there is no change because git understand that you are working locally in this files and (for the moment) there is no conflict with any other modification coming from the repo.
If you want to undo your changes you need to use checkout:
git checkout filepath
Upvotes: 1