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
- For Ruby on Rails project pull request, git push to my fork failing
- Is there a way to display a message to an end-user when they commit a file in Git?
- Eclipse, Git and Bitbucket - Can't push - Error 401 Unauthorized
- Why does “git push origin @” not work?
- successful git push not displayed in Gerrit interface
- Push commit to 2 different remote branches?
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.