问题
I would like to have popup notifications when people make commits to repositories that I am watching. Not hosted on any particular site like github or anything, so the ability to just add the repository URL to a list of watched repositories would be needed. And as the title says, this is for Ubuntu, but cross platform is welcome!
回答1:
And thus, git-notify was born!
This little bash script will watch your origin/master for updates every 60 seconds and uses notify-send to alert you of new commits.
回答2:
If the repo isn't hosted locally (ie other people pushing to a repository hosted on your hard drive), you're probably going to need some form of polling, which is going to be slow and/or painful. Look at @Abizern's idea instead and create post-receive hooks in the repositories that send out emails whenever someone pushes to them. At my company we use the stock hook scripts included in the git suite, they're pretty fantastic and useful.
回答3:
Have you looked at writing post-commit hooks?
来源:https://stackoverflow.com/questions/5082001/is-there-a-tool-to-watch-a-remote-git-repository-on-ubuntu-and-do-popup-notifica