Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
git command to fetch the latest committed changes directly from the master repo rather than from the local repo.
-
I am new to git. I have a query on git.
In p4 we can check the latest changes submitted directly from the repository using
p4 changes -m 3 //depot/project/....Is there a equivalent command available in git through which I can get the result of the latest committed changes directory from the master repo, rather than querying from my local repo.
I am aware of git log n 3 command but it will fetch me the result from my local repo, I want to fetch it directly from the master repo.
-
if you mean using the stash version of git, use
git fetch origin
. (or whatever your remote name is) will bring the changes from the remote repo into yours, into a seperate remotes/origin spot, so wont override any of your pending changes (use git merge to do that).there is not a super easy way to see the changes, other than to do a merge, then git diff before comitting (assuming it is not just a fast forward merge, which does not require a commit.). you can use
git reset
to then go back to the pre merge state, or int the case of a fast forward merge, you'd need to point the branch back at the old sha.backup before trying any of this, and make sure you have no uncommitted local changes!