Say I did a git clone from a url for a repository. I made some changes to a file, did a git commit.
When I do a git pull, I see that it says \"Already up-to-date\"
When you pull, it pulls in the history from the server and automatically tries to merge anything you have changed, with things that other people have changed. If it can do it automatically, then it will succeed and you won't see anything, and if it fails then you will be asked to fix any conflicts. You will never be able to silently override changes that other people have made.
If you do want to see if someone has changed something, you can run this git fetch
and then git status
. Status will print out what files have changes locally, but it will also say something like "Your branch is 2 commits ahead of origin/master", meaning you have 2 commits that have not been pushed to the server. If someone else has pushed to the server too, then it will say something like "Your local branch and the origin/master have diverged. This means both you and someone else have committed to master, and when you pull it will try to merge them, as described above.