omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.

    Pythonista
    2
    2
    1316
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • mvb
      mvb last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • JonB
        JonB last edited by

        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!

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB Forums | Contributors