https://github.com/thepante/tmux-git-autofetch
Tmux git autofetch: Automatically fetches current opened git repositories on your tmux session
https://github.com/thepante/tmux-git-autofetch
git shell tmux
Last synced: about 2 months ago
JSON representation
Tmux git autofetch: Automatically fetches current opened git repositories on your tmux session
- Host: GitHub
- URL: https://github.com/thepante/tmux-git-autofetch
- Owner: thepante
- License: mit
- Created: 2023-10-12T23:02:44.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-12-01T01:30:17.000Z (7 months ago)
- Last Synced: 2025-12-03T11:45:26.573Z (7 months ago)
- Topics: git, shell, tmux
- Language: Shell
- Homepage:
- Size: 200 KB
- Stars: 16
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Your Git workflow with automated repository fetching
This plugin automates the process of fetching updates from remote git repositories, making your coding life a little bit smoother.
Useful when you deal with git repositories that get frequent updates. Instead of the tedious 'git fetch' routine, this handle it
for you in the background.

_(play the gif and look top-right just along with `master`: it fetches and the status got updated)_
## Installation
Using [`tpm`](https://github.com/tmux-plugins/tpm/): on your `.tmux.conf` add this line:
```sh
set -g @plugin 'thepante/tmux-git-autofetch'
```
Afterward, install it by pressing ` + I`.
This installation adds a cron job and a zsh hook to automate the fetching process.
## Usage
Once installed, your open repositories will be automatically fetched in the background every 3 minutes.
---
## Options
You can add the following options on your tmux config file:
#### `@git-autofetch-skip-paths`
Defines regex pattern to skip specific paths to autofetch.
Default: ` ` (empty)
```bash
set -g @git-autofetch-skip-paths ".*"
```
#### `@git-autofetch-scan-paths`
Defines regex pattern for paths to enable autofetching. Higher priority than `skip-paths` pattern.
Default: ` ` (empty)
```bash
set -g @git-autofetch-scan-paths "~/Projects/.*|.*\/probandoski"
```
#### `@git-autofetch-frequency`
Set the fetching interval in minutes.
Default: `3`
```bash
set -g @git-autofetch-frequency "1"
```
#### `@git-autofetch-logging`
Enables or disables debug logging.
Default: `false`
```bash
set -g @git-autofetch-logging "true"
```
With the examples provided: it will write the logging file, scan every minute, and also would autofetch only those repositories
inside `~/Projects` and the `anywhere/probandoski` one.
## Notes
- This plugin only fetches updates; it does not perform git pulls nor display info about it.
You can display the status using
any method you prefer. For instance, you can integrate it with [gitmux](https://github.com/arl/gitmux) for your tmux status bar.
- For private repositories: ensure that your SSH credentials are correctly configured to avoid fetching rejections.
## Motivation
I work with multiples repositories that are frequently updated. I sticked with vscode mainly for its auto-fetch feature.
I haven't come across a comparable solution for the terminal, so I made this plugin for tmux to ensure that I can work without
concerns about overlooking any changes in the repositories.
Feel free to leave feedback or any other type of contribution.