Skip to main content

Easily update multiple git repositories at once

Project description

gitup (the git-repo-updater)

ci

gitup is a tool for updating multiple git repositories at once. It is smart enough to handle several remotes, dirty working directories, diverged local branches, detached HEADs, and more. It was originally created to manage a large collection of projects and deal with sporadic internet access.

gitup works on macOS, Linux, and Windows. You should have a recent version of git and Python 3.8+ installed.

Installation

With uv:

uv tool install gitup

With pipx:

pipx install gitup

With pip:

pip install gitup

With Homebrew:

brew install gitup

Usage

There are two ways to update repos: you can pass them as command arguments, or save them as "bookmarks".

For example:

gitup ~/repos/foo ~/repos/bar ~/repos/baz

will automatically pull to the foo, bar, and baz git repositories. Additionally, you can just type:

gitup ~/repos

to automatically update all git repositories in that directory.

To add bookmarks, either of these will work:

gitup --add ~/repos/foo ~/repos/bar ~/repos/baz
gitup --add ~/repos

Then, to update all of your bookmarks, just run gitup without args:

gitup

Delete a bookmark:

gitup --delete ~/repos

View your current bookmarks:

gitup --list

You can mix and match bookmarks and command arguments:

gitup --add ~/repos/foo ~/repos/bar
gitup ~/repos/baz            # update 'baz' only
gitup                        # update 'foo' and 'bar' only
gitup ~/repos/baz --update   # update all three!

Update all git repositories in your current directory:

gitup .

You can control how deep gitup will look for repositories in a given directory, if that directory is not a git repo by itself, with the --depth (or -t) option. --depth 0 will disable recursion entirely, meaning the provided paths must be repos by themselves. --depth 1 will descend one level (this is the old behavior from pre-0.5 gitup). --depth -1 will recurse indefinitely, which is not recommended. The default is --depth 3.

By default, gitup will fetch all remotes in a repository. Pass --current-only (or -c) to make it fetch only the remote tracked by the current branch.

Also by default, gitup will try to fast-forward all branches that have upstreams configured. It will always skip branches where this is not possible (e.g. dirty working directory or a merge/rebase is required). Pass --fetch-only (or -f) to skip this step and only fetch remotes.

After fetching, gitup will keep remote-tracking branches that no longer exist upstream. Pass --prune (or -p) to delete them, or set fetch.prune or remote.<name>.prune in your git config to do this by default.

For a full list of all command arguments and abbreviations:

gitup --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitup-0.5.2.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

gitup-0.5.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file gitup-0.5.2.tar.gz.

File metadata

  • Download URL: gitup-0.5.2.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for gitup-0.5.2.tar.gz
Algorithm Hash digest
SHA256 e750d63c9f4938cad175619a8a22f8ab3a3854515e4f5ac6e72c88e848fe651c
MD5 1cfeddffe7ba1eed570e90408445e350
BLAKE2b-256 419e3e47a00bf3c4e47f2acec776732421819b723d5adeae3b0adf0ed5f82c0d

See more details on using hashes here.

File details

Details for the file gitup-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: gitup-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.12

File hashes

Hashes for gitup-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2cb20a2bde3301e8f4bdc4b82fce3762b7a3d9973683d53e63da796ea53f15c5
MD5 2e5cd715a9d4b4a52f1daa900499831e
BLAKE2b-256 a18bc94a649c9adcb5c6c29cba628779c4ee21d3566c832158766820f01454f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page