{"id":15905703,"url":"https://github.com/msiemens/pygitup","last_synced_at":"2025-05-15T21:04:05.408Z","repository":{"id":6414091,"uuid":"7652428","full_name":"msiemens/PyGitUp","owner":"msiemens","description":"A nicer `git pull`","archived":false,"fork":false,"pushed_at":"2024-10-07T17:25:36.000Z","size":456,"stargazers_count":532,"open_issues_count":8,"forks_count":43,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-08T03:04:59.487Z","etag":null,"topics":["git","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msiemens.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-01-16T19:39:48.000Z","updated_at":"2025-04-20T14:47:57.000Z","dependencies_parsed_at":"2024-06-18T22:54:47.146Z","dependency_job_id":"d28418b9-5db1-47f4-9803-121dfdc9fa24","html_url":"https://github.com/msiemens/PyGitUp","commit_stats":{"total_commits":317,"total_committers":24,"mean_commits":"13.208333333333334","dds":0.4542586750788643,"last_synced_commit":"eb7b155e3396ac645dc075665e87b16bc34e6827"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiemens%2FPyGitUp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiemens%2FPyGitUp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiemens%2FPyGitUp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msiemens%2FPyGitUp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msiemens","download_url":"https://codeload.github.com/msiemens/PyGitUp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253909462,"owners_count":21982690,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","python"],"created_at":"2024-10-06T13:06:52.748Z","updated_at":"2025-05-15T21:04:05.374Z","avatar_url":"https://github.com/msiemens.png","language":"Python","readme":"PyGitUp |Version| |Build Status| |Coverage Status|\n==================================================\n\n|PyGitUp|_ is a Python port of\n`aanand/git-up \u003chttps://github.com/aanand/git-up/\u003e`__. It not only\nfully covers the abilities of git-up and should be a drop-in replacement,\nbut also extends it slightly.\n\n.. |PyGitUp| replace:: ``PyGitUp``\n.. _PyGitUp: https://github.com/msiemens/PyGitUp\n\nWhy use ``git up``?\n-------------------\n\n    git pull has two problems:\n\n    * It merges upstream changes by default, when it's really more polite to `rebase\n      over them \u003chttp://gitready.com/advanced/2009/02/11/pull-with-rebase.html\u003e`__,\n      unless your collaborators enjoy a commit graph that looks like bedhead.\n\n    * It only updates the branch you're currently on, which means git push will\n      shout at you for being behind on branches you don't particularly care about\n      right now.\n\n    (https://github.com/aanand/git-up/)\n\nDemonstration\n-------------\n\n.. image:: http://i.imgur.com/EC3pvYu.gif\n\nWhy use the Python port?\n------------------------\n\nI wasn't able to use the original ``git-up``, because I didn't want to install\na whole Ruby suite just for `git-up` and even with Ruby installed, there were\nsome problems running on my Windows machine. So, my reasons for writing\nand using this port are:\n\n1. Windows support.\n2. Written in Python ;)\n\nHow do I install it?\n--------------------\n\n1. Install ``git-up`` via `pip \u003chttps://pip.pypa.io/en/latest/installing.html\u003e`__: ``$ pip install git-up``\n2. ``cd`` to your project's directory.\n3. Run ``git up`` and enjoy!\n\nHomebrew users can also use ``brew``: ``brew install pygitup``\n\nHow to run it locally?\n----------------------\n\nCould also checkout the **.github/workflows/ci-workflow.yml**\n\n1. clone repo and ``cd`` to repo directory.\n2. Install ``poetry`` as guided by `poetry installation doc \u003chttps://python-poetry.org/docs/#installation\u003e`__\n3. Run ``poetry install``\n4. Run program with ``poetry run git-up``\n5. Run all tests with ``poetry run pytest -v --cov=PyGitUp`` or ``poetry run pytest -v --cov=PyGitUp --cov-report html``\n6. Run one test with ``poetry run pytest -q PyGitUp/tests/test_version.py -v --cov=PyGitUp``\n\nNote for Windows users:\n~~~~~~~~~~~~~~~~~~~~~~~\n\nSee `these instructions \u003chttp://stackoverflow.com/q/4750806/997063\u003e`__\nfor installing pip, if you haven't already installed it. And don't forget\nto either:\n\n- make your ``Python/Scripts`` and ``Python/Lib/site-packages`` writable for\n  you,\n- run ``pip`` with admin privileges\n- or use ``pip install --user git-up`` and add ``%APPDATA%/Python/Scripts``\n  to ``%PATH%``.\n\nOtherwise pip will refuse to install ``git-up`` due to ``Access denied`` errors.\n\nPython version compatibility:\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPython 3.7 and upwards are supported :)\n\nOptions and Configuration\n-------------------------\n\nCommand Line Arguments\n~~~~~~~~~~~~~~~~~~~~~~\n\n- ``git up -h`` shows a help message.\n\n- ``git up --quiet`` suppresses all output except for error messages.\n\n- ``git up --no-fetch`` skips fetching the remote and rebases all local branches.\n\n- ``git up --version`` shows the current version and optionally checks for\n  updates (see below).\n\nConfiguration\n~~~~~~~~~~~~~\n\nTo configure ``PyGitUp``, you can set options in your git config. Run\n``git config [--global] git-up.[name] [value]`` to set one of these\noptions:\n\n-  ``git-up.fetch.prune [*true*|false]``: If set to ``true``,\n   ``PyGitUp`` will append the ``--prune``\\ option to ``git fetch`` and\n   thus remove any remote tracking branches which no longer exist on\n   the remote (see `git fetch\n   --help \u003chttp://linux.die.net/man/1/git-fetch\u003e`__).\n\n-  ``git-up.fetch.all [true|*false*]``: If set to ``false``, ``PyGitUp``\n   will only fetch remotes for which there is at least one local\n   tracking branch. Setting this option will make ``git up`` always fetch\n   from all remotes, which is useful if e.g. you use a remote to push to\n   your CI system but never check those branches out.\n\n- ``git-up.push.auto [true|*false*]``: Push the current branch after\n  rebasing and fast-forwarding.\n\n- ``git-up.push.all [true|*false*]``: Push all branches when auto-pushing.\n\n- ``git-up.push.tags [true|*false*]``: Push tags when auto-pushing.\n\n-  ``git-up.rebase.arguments [string]``: If set, ``PyGitUp`` will use\n   this string as additional arguments when calling ``git rebase``.\n   Example: ``--preserve-merges`` to recreate merge commits in the\n   rebased branch.\n\n-  ``git-up.rebase.auto [*true*|false]``: If set to ``false``,\n   ``PyGitUp`` won't rebase your branches for you but notify you that\n   they diverged. This can be useful if you have a lot of in-progress\n   work that you don't want to deal with at once, but still want to\n   update other branches.\n\n-  ``git-up.rebase.log-hook [cmd]``: Runs ``cmd`` every time a branch\n   is rebased or fast-forwarded, with the old head as ``$1`` and the new\n   head as ``$2``. This can be used to view logs or diffs of incoming\n   changes. Example:\n   ``echo \"changes on $1:\"; git log --oneline --decorate $1..$2``.\n\n- ``git-up.rebase.show-hashes [true|*false*]``: If set to ``true``,\n  ``PyGitUp`` will show the hashes of the current commit (or the point\n  where the rebase starts) and the target commit like ``git pull`` does.\n\nNew in v1.0.0:\n~~~~~~~~~~~~~~\n\n- ``git-up.updates.check [*true*|false]``: When running ``git up --version``,\n  it shows the version number and checks for updates. If you feel\n  uncomfortable with it, just set it to ``false`` to turn off the checks.\n\nCredits\n-------\n\nThe original ``git-up`` has been written by aanand:\n`aanand/git-up/ \u003chttps://github.com/aanand/git-up/\u003e`__.\n\n\nChangelog\n---------\n\nv2.3.0 (*2024-10-05*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Improve logging when updating large repositories. Thanks\n  `@bdmartin \u003chttps://github.com/bdmartin\u003e`_ for `Pull Request #132\n  \u003chttps://github.com/msiemens/PyGitUp/pull/132\u003e`_.\n- Drop support for Python 3.7\n\nv2.2.0 (*2022-11-21*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Add support for Python 3.11. Thanks\n  `@hugovk \u003chttps://github.com/hugovk\u003e`_ for `Pull Request #118\n  \u003chttps://github.com/msiemens/PyGitUp/pull/118\u003e`_.\n\nv2.1.0 (*2021-10-02*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Switch to Python's ``argparse`` for CLI argument parsing. Thanks\n  `@ekohl \u003chttps://github.com/ekohl\u003e`_ for `Pull Request #96\n  \u003chttps://github.com/msiemens/PyGitUp/pull/96\u003e`_.\n\nv2.0.3 (*2021-09-23*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Drop support for Python 3.6 (following GitPython)\n- Update PyGitUp's CLI argument parser `Click \u003chttps://click.palletsprojects.com/en/8.0.x/\u003e`_\n  to version 8.0. Thanks `@hugovk \u003chttps://github.com/hugovk\u003e`_\n  for `Pull Request #109 \u003chttps://github.com/msiemens/PyGitUp/pull/109\u003e`_.\n- Update other dependencies\n\nv2.0.2 (*2020-12-30*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Remove old Python 2 code. Thanks `@hugovk \u003chttps://github.com/hugovk\u003e`_\n  for `Pull Request #104 \u003chttps://github.com/msiemens/PyGitUp/pull/104\u003e`_.\n\nv2.0.1 (*2020-08-26*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Update dependencies\n\nv2.0.0 (*2020-08-15*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Drop Python 2 support in order to fix `Issue 102 \u003chttps://github.com/msiemens/PyGitUp/issues/102\u003e`_\n- Drop Ruby Bundler integration\n- Migrate tests to ``py.test``\n\nv1.6.1 (*2018-12-12*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Upgrade to click\u003e=7.0.0. Thanks `@no-preserve-root \u003chttps://github.com/no-preserve-root\u003e`_\n  for `Pull Request #87 \u003chttps://github.com/msiemens/PyGitUp/pull/87\u003e`_.\n\nv1.6.0 (*2018-10-26*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Skip stashing changes when possible. Thanks `@Chronial \u003chttps://github.com/Chronial\u003e`_\n  for `Pull Request #86 \u003chttps://github.com/msiemens/PyGitUp/pull/86\u003e`_.\n- Added faster fast-forward on branches that are not checked out. Thanks `@Chronial \u003chttps://github.com/Chronial\u003e`_\n  for `Pull Request #83 \u003chttps://github.com/msiemens/PyGitUp/pull/83\u003e`_.\n\nv1.5.2 (*2018-09-28*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed version requirement for Click dependency (`#82 \u003chttps://github.com/msiemens/PyGitUp/issues/82\u003e`__).\n\nv1.5.1 (*2018-09-13*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed crash on Cygwin with rebase log hook enabled (`#80 \u003chttps://github.com/msiemens/PyGitUp/issues/80\u003e`__).\n\nv1.5.0 (*2018-04-26*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Added auto-push support. Thanks `@WoLpH \u003chttps://github.com/WoLpH\u003e`_\n  for `Pull Request #74 \u003chttps://github.com/msiemens/PyGitUp/pull/74\u003e`_.\n\nv1.4.7 (*2018-04-07*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Added shorthand commandline arguments (``-V, -q, -h``, see `#73 \u003chttps://github.com/msiemens/PyGitUp/issues/73\u003e`__).\n\nv1.4.6 (*2017-12-19*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- 3rd party dependencies have been updated (see `#65 \u003chttps://github.com/msiemens/PyGitUp/issues/65\u003e`__).\n\nv1.4.5 (*2017-01-02*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed problems when working with branches containing hash signs in their name\n  (`#55 \u003chttps://github.com/msiemens/PyGitUp/issues/55\u003e`__).\n- No longer installs a now unneeded script on ``pip install``. Thanks `@ekohl \u003chttps://github.com/ekohl\u003e`_\n  for `Pull Request #60 \u003chttps://github.com/msiemens/PyGitUp/pull/60\u003e`_.\n\nv1.4.4 (*2016-11-30*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed a bug when working with ``git worktree`` (`#58 \u003chttps://github.com/msiemens/PyGitUp/issues/58\u003e`__).\n\nv1.4.3 (*2016-11-22*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed a bug with GitPython \u003c= 2.0.8 (`#56 \u003chttps://github.com/msiemens/PyGitUp/issues/56\u003e`__, `#57 \u003chttps://github.com/msiemens/PyGitUp/issues/57\u003e`__).\n\nv1.4.2 (*2016-09-29*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Switched the command line argument parsing library (`#53 \u003chttps://github.com/msiemens/PyGitUp/issues/53\u003e`__).\n\nv1.4.1 (*2016-08-02*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Include tests in PyPI distribution (`#51 \u003chttps://github.com/msiemens/PyGitUp/issues/51\u003e`__).\n\nv1.4.0 (*2016-02-29*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- 3rd party dependencies have been updated.\n- Dependencies on 3rd party libraries have been loosened to better interact with other installed packages.\n  Thanks `MaximilianR \u003chttps://github.com/MaximilianR\u003e`_ for `Pull Request #45 \u003chttps://github.com/msiemens/PyGitUp/pull/45\u003e`_.\n- Added an command line argument to turn of fetching (``--no-fetch``). Thanks `@buoto \u003chttps://github.com/buoto\u003e`_\n  for `Pull Request #46 \u003chttps://github.com/msiemens/PyGitUp/pull/46\u003e`_.\n- Don't show a stacktrace anymore when stashing fails (`#35 \u003chttps://github.com/msiemens/PyGitUp/issues/35\u003e`_).\n- Fixed a bug that caused problems with submodules if the submodule had unstashed changes/ Thanks\n  `@Javex \u003chttps://github.com/Javex\u003e`_ for `Pull Request #27 \u003chttps://github.com/msiemens/PyGitUp/pull/27\u003e`_.\n\nv1.3.1 (*2015-08-31*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed a bug when showing the version on Python 3 `#34 \u003chttps://github.com/msiemens/PyGitUp/issues/34\u003e`__.\n\nv1.3.0 (*2015-04-08*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Support for Python 3 has been added. Thanks `@r4ts0n \u003chttps://github.com/r4ts0n\u003e`_\n  for `Pull Request #23 \u003chttps://github.com/msiemens/PyGitUp/pull/23\u003e`_\n  and `@Byron \u003chttps://github.com/Byron\u003e`_ for quickly merging a Pull Request\n  in `GitPython \u003chttps://github.com/gitpython-developers/GitPython\u003e`_\n  and releasing a new version on which this release depends.\n\nv1.2.2 (*2015-02-23*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Now updates submodules when called from ``git submodule foreach`` (`#8 \u003chttps://github.com/msiemens/PyGitUp/issues/8\u003e`__).\n\nv1.2.1 (*2014-12-16*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed a problem with ``setuptools 8.x`` (`#19 \u003chttps://github.com/msiemens/PyGitUp/issues/19\u003e`__).\n- 3rd party dependencies have been updated\n\nv1.2.0 (*2014-12-10*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Added an option to show hashes when fast-forwarding/rebasing like ``git pull``\n  does (``git-up.rebase.show-hashes``).\n- Fixed a bug when having branches with both local tracking branches and\n  remote tracking branches (`#17 \u003chttps://github.com/msiemens/PyGitUp/issues/17\u003e`__).\n\nv1.1.5 (*2014-11-19*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- 3rd party dependencies have been updated to fix a problem with a 3rd party\n  library (`#18 \u003chttps://github.com/msiemens/PyGitUp/issues/18\u003e`__).\n\nv1.1.4 (*2014-04-18*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed some typos in README and ``PyGitUp`` output.\n- 3rd party dependencies have been updated.\n\nv1.1.3 (*2014-03-23*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- ``ahead of upstream`` messages are now cyan (see `aanand/git-up#60 \u003chttps://github.com/aanand/git-up/issues/60\u003e`__).\n- Fixed problem when using % in the log hook (`#11 \u003chttps://github.com/msiemens/PyGitUp/issues/11\u003e`__).\n\nv1.1.2 (*2013-10-08*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed problems with the dependency declaration.\n\nv1.1.1 (*2013-10-07*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fix for `#7 \u003chttps://github.com/msiemens/PyGitUp/issues/7\u003e`__\n  (AttributeError: 'GitUp' object has no attribute 'git') introduced by\n  v1.1.0.\n\nv1.1.0 (*2013-10-07*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Prior to v1.1.0, ``PyGitUp`` tried to guess the upstream branch for a local\n  branch by looking for a branch on any remote with the same name. With v1.1.0,\n  ``PyGitUp`` stops guessing and uses the upstream branch config instead.\n\n  This by the way fixes issue `#6 \u003chttps://github.com/msiemens/PyGitUp/issues/6\u003e`__\n  (``git up`` doesn't work with local only branches).\n\n  **Note:**\n  This change may break setups, where a local branch accidentally has\n  the same name as a remote branch without any tracking information set. Prior\n  to v1.1.0, ``git up`` would still fetch and rebase from the remote branch.\n  If you run into troubles with such a setup, setting tracking information\n  using ``git branch -u \u003cremote\u003e/\u003cremote branch\u003e \u003clocal branch\u003e`` should help.\n\n- 3rd party dependencies have been updated.\n\n- Allows to run ``git up --version`` from non-git dirs, too.\n\nv1.0.0 (*2013-09-05*)\n~~~~~~~~~~~~~~~~~~~~~\n\nFinally ``PyGitUp`` reaches 1.0.0. You can consider it stable now :)\n\n- Added a comprehensive test suite, now with a coverage of about 90%.\n- Lots of code cleanup.\n- Added option ``-h`` to display a help screen (``--help`` **won't** work, because\n  ``git`` catches this option and handles it before ``PyGitUp`` can do).\n- Added option ``--version`` to show, what version of ``PyGitUp`` is running.\n  Also checks for updates (can be disabled, see configuration).\n- Added option ``--quiet`` to be quiet and only display error messages.\n\nv0.2.3 (*2013-06-05*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed issue `#4 \u003chttps://github.com/msiemens/PyGitUp/issues/4\u003e`__ (ugly\n  exception if remote branch has been deleted).\n\nv0.2.2 (*2013-05-04*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed issue `#3 \u003chttps://github.com/msiemens/PyGitUp/issues/3\u003e`__ (didn't\n  return to previous branch).\n\n\nv0.2.1 (*2013-03-18*)\n~~~~~~~~~~~~~~~~~~~~~\n\n- Fixed problem: check-bundler.rb has not been installed when installing via\n  PyPI (problems with setup.py).\n\nv0.2 (*2013-03-18*)\n~~~~~~~~~~~~~~~~~~~\n\n- Incorporated `aanand/git-up#41 \u003chttps://github\n  .com/aanand/git-up/pull/41\u003e`__: Support for ``bundle install --local`` and\n  ``rbenv rehash``.\n- Fixed issue `#1 \u003chttps://github.com/msiemens/PyGitUp/issues/1\u003e`__ (strange\n  output buffering when having multiple remotes to fetch from).\n- Some under-the-hood improvements.\n\nv0.1 (*2013-03-14*)\n~~~~~~~~~~~~~~~~~~~\n\n- Initial Release\n\n.. |Build Status| image:: https://img.shields.io/github/actions/workflow/status/msiemens/PyGitUp/ci-workflow.yml?style=flat-square\n   :target: https://dev.azure.com/msiemens/github/_build?definitionId=1\n\n.. |Coverage Status| image:: http://img.shields.io/coveralls/msiemens/PyGitUp/master.svg?style=flat-square\n  :target: https://coveralls.io/r/msiemens/PyGitUp\n\n.. |Version| image:: http://img.shields.io/pypi/v/git-up.svg?style=flat-square\n  :target: https://pypi.python.org/pypi/git-up\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsiemens%2Fpygitup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsiemens%2Fpygitup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsiemens%2Fpygitup/lists"}