getting update that remote branch has new commit?

Is there a way in git to get an update new commit has been made to the branch by the user?

I have used a command git notify, but it only gives notification if user pulls the branch

  • How can I setup a non-bare git repo on my server?
  • synchronize git branch with master, selectively
  • Why does “git push origin @” not work?
  • Why does git push fails with “Operation timed out”?
  • How to recover from git push -f?
  • Disable push to specific branches on GitHub
  • Push a tag to a remote repository using Git?
  • git push error between two local respositories
  • One Solution collect form web for “getting update that remote branch has new commit?”

    I guess a few git clients with a gui will have this option, one of them is SourceTree. It will basically keep checking the repository every so often, in SourceTree by default I think is 10 minutes, configurable.
    If you don’t want to use these kind of programs, you could create a script to either run it whenever you want to check the repository given a time frequency. For that:
    Supposing that origin refers to the repository, you would need to do

    git fetch origin
    

    Then, the remote branch origin/master will contain the snapshot of master in the remote repository. Now, you can compare master and origin/master with

    git log master...origin/master
    

    to see the commits that are only in master or origin/master.

    Git Baby is a git and github fan, let's start git clone.