Is there a tool to watch a remote Git repository o

2020-05-19 16:56发布

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!

3条回答
欢心
2楼-- · 2020-05-19 17:33

Have you looked at writing post-commit hooks?

查看更多
混吃等死
3楼-- · 2020-05-19 17:37

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.

查看更多
对你真心纯属浪费
4楼-- · 2020-05-19 17:50

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.

查看更多
登录 后发表回答