0

How can i get updated commits from remote to local branch when we call git pull or git fetch?

I need to know the list of commits that are updated on call of git.pull so that i will get to know the list of files that got changed ,author of the commit who have made the commit.

  • It's not really clear to me what you want here. It is important to note that in Git there is no such thing as a "remote branch": all you have is the commit (and annotated-tag) graph, and a set of modifiable names that contain hash IDs. Running `git pull` runs `git fetch`; running `git fetch` connects your Git to another Git and collects from that other Git, some commit(s) and some name(s), which your Git then uses to update, or not update, various names in your own repository. – torek May 02 '17 at 15:41
  • If you want to see what names were updated and their old and new values, you can simply scan all names before the fetch, then scan again after the fetch. Any name/value pairs that change, were updated by the fetch. That's not the same as the set of commits that may have come in during the fetch, since you can already have commits `a123456` and `b987654` and simply change several names so that ones that used to point to `a123...` now point to `b987...` and so on. – torek May 02 '17 at 15:42
  • @torek "remotebranch" in the sence the updated content of the branch in the repository (which was pushed by some other commit). my requirement is to get the list of files that got changed and names of the authors who have changed it with the current status of the branch in local cloned repo to the one that is updated. – tarunkumar May 03 '17 at 05:21

0 Answers0