I noticed that SVN revert doesn't EXACTLY behave the same way as GIT checkout...:
SVN case: If I have a SVN remote repository that I checkout on my computer, and make modifications on a file locally. While I do this, someone commits new changes on that same file on the server.
Now I want to revert my changes on my local repository. I do
svn revert [file]
And this gives me the file in the exact same state as the one I had on my computer when I checked out the remot repository.
GIT case: Now With GIT. I clone a remote repository, do some changes on a file, someone pushes some commits that affects that same file, and I want to do
git checkout -- file
This is gonna give me the version of the file modified by that someone mentioned earlier, not the file I cloned at the beginning of this user story.
Now, I guess I could do:
git checkout [commit number of the remote version I cloned] -- file
But I find it "tedious / vexing", knowing that I just want to revert my file to the local version of my repository.
So my question is: Is there a way to specifically checkout a file to the version I had on my local repository when I last pulled the remote repository? something like:
git checkout local -- file
? Thanks in advance for your precious comments & answers =)