是否有一个 git 指示器来获取提交、拉取通知?

Spi*_*Wan 7 notification indicator git software-recommendation

是否有用于监视 git 存储库并在提交、推送等时获得通知的指示器?

搜索“指标 ubuntu git watch 存储库”给我发送了很多托管在 github 上的指标......找不到任何有用的东西......

Khu*_*lam 8

我想你想要的是 git-dude。

混蛋

https://github.com/sickill/git-dude

git-dude 是一个简单的 git 桌面通知程序。它监视当前目录中的 git 存储库中是否有新的提交/分支/标签,并在有任何新到达时显示桌面通知。

这个怎么运作

它只是使用git fetch并解析其输出以查看发生了什么变化。然后它git log使用notify-send/ kdialog(Linux) 或growlnotify(OSX)格式化新的提交消息并显示桌面通知 。所有这一切都在无限循环中。

它看起来如何

Fedora (Gnome-Shell):

Fedora 上的 git-dude

Ubuntu:

Ubuntu 上的 git-dude

要求

在 Linux 上:

  • notify-send在 Gnome 上(Fedora:libnotify包,Ubuntu:libnotify-bin包)
  • kdialog 在 KDE 上(包含在 KDE 中)

在 OSX 上:

  • growlnotify,来自Growl Extras (自制软件:growlnotify包)

安装

$ curl -skL https://github.com/sickill/git-dude/raw/master/git-dude >~/bin/git-dude
$ chmod +x ~/bin/git-dude
Run Code Online (Sandbox Code Playgroud)

* 确保~/bin在您的脚本中$PATH或将git-dude脚本放在您的$PATH.

用法

git-dude 遍历dude 目录中的存储库。该目录只不过是您要观看的项目的克隆存储库的容器。随意命名,例如我们使用 ~/.git-dude

$ mkdir ~/.git-dude
$ cd ~/.git-dude
Run Code Online (Sandbox Code Playgroud)

克隆一些存储库:

$ git clone --mirror https://github.com/joelthelion/autojump.git
$ git clone --mirror git://github.com/pyromaniac/hoof.git
Run Code Online (Sandbox Code Playgroud)

我建议git clone --mirror- 它不检出工作目录,因此它为更大的项目节省了一些磁盘空间。

符号链接的存储库也可以工作。这样你就可以监控已经克隆的项目:

$ ln -s ~/code/tmuxinator .
Run Code Online (Sandbox Code Playgroud)

现在运行它来监视pwd

$ git dude
Run Code Online (Sandbox Code Playgroud)

您还可以将目录名称作为第一个参数传递以指定要监视的目录而不是pwd

$ git dude ~/watched-repos
Run Code Online (Sandbox Code Playgroud)

通过这种方式,您可以拥有多个dude 目录,每个目录都由单独的 git-dude 进程监视。

配置

全球的

设置 git-dude 检查更改的频率(以秒为单位,默认值:60):

$ git config --global dude.interval 30
Run Code Online (Sandbox Code Playgroud)

设置桌面通知使用的图标的路径(默认:无):

$ git config --global dude.icon ~/.git-dude/github_32.png
Run Code Online (Sandbox Code Playgroud)

设置自定义通知命令($TITLE$DESCRIPTION$ICON_PATH 环境变量调用通知命令时设置):

$ git config --global dude.notify-command 'gntp-send "$TITLE" "$DESCRIPTION" "$ICON_PATH"'
$ git config --global dude.notify-command 'echo -e "$TITLE\n\n\n$DESCRIPTION" | espeak --stdin -k20 -ven+12'
Run Code Online (Sandbox Code Playgroud)

每个存储库

设置此存储库的桌面通知使用的图标的路径(默认值:取自全局设置):

$ git config dude.icon ~/.git-dude/dm-core/datamapper.png
Run Code Online (Sandbox Code Playgroud)

告诉 git-dude 忽略特定的存储库(如果你想取消监视它):

$ git config dude.ignore true
Run Code Online (Sandbox Code Playgroud)

作者

Marcin Kulik ( http://ku1ik.com/ | @sickill)


要跟踪通知,请使用“最近的通知”指示器

截图最近的通知

在终端运行中:

sudo add-apt-repository ppa:jconti/recent-notifications
sudo apt-get update
sudo apt-get install indicator-notifications
Run Code Online (Sandbox Code Playgroud)

安装后运行Alt+ F2 unity --replace.

您会在面板中找到一个小邮箱: 面板中的最近通知]


its*_*dok 2

我写了一个小 python 程序,可以满足您的需求。它的边缘有点粗糙,所以我很感激您的任何反馈。

ubuntu git 指示器

要使用它,请从包含一个或多个 git 存储库的目录运行 git-indicator (就像您使用 git-dude 一样)。

例子:

~$ git clone https://github.com/itsadok/git-indicator.git ~/.git-indicator
~$ cd ~/repos
~/repos$ ls
repo1 repo2 repo3
~/repos$ ~/.git-indicator/git-indicator.py &
Run Code Online (Sandbox Code Playgroud)