Skip to main content

GitMerge

As many developers have to use a separate Git account during work, a large amount of their work is not tracked in their personal profile which is often a good reference on resumes etc. GitMerge solves this problem by importing meta data of your work commits to a dummy repo in your private Git account.


Installation

Easiest way:

pip install gitmerge

Or you can also install it from source. For development clone the repo and install it with -e flag.

git clone git@github.com:bensch98/git-merge.git
cd git-merge
pip install -e .

If you have nice ideas, feel free to open a PR.


Usage

The easiest way to use this package is via its CLI.

gitmerge merge --author [GIT_NAME] --src [SOURCE_REPO] --dest [DESTINATION_REPO] --company [COMPANY_NAME] --since 2021-12-31 --until 2022-01-10

Flags:

  • --author: Your Git username which was used for the commits. Only commits of this account will be merged into the destination repo.
  • --src: Relative path to the source repository from which you want to import the commits.
  • --dest: Relative path to the destination/dummy repository where the commits will be imported into. For each repository a directory and file will be created where meta data of the commits will be stored.
  • --company: The name of the company which owns the repository. Can be omitted in the future.
  • --since: Specifies from where on the commits should be taken into account. Can be specified as date (2021-09-30, 2021/09/30, 2021-9-1, 2021/9/30, ...) or as a delta value.
  • --list: Can be used to view the commits which would be committed and pushed without this flag. It does nothing despite printing out the commits to the terminal.

For more help use the --help flag of the CLI.

Examples for --since flag:

  • 1y: All commits of last year.
  • 1y3m: All commits of last 15 months.
  • 2w4d: All commits of last 2 weeks and 4 days (18 days).
  • 40d1y: All commits of last year and 40 days (405 days).
  • 0d: Only todays commits.

--since defaults to the last 7 days if nothing was specified. Each mode (y = year, m = month, w = week, d = days) defaults to 0 if omitted. Therefore 2d == 0y0m0w2d. --until default to current datetime

The package can also be imported and used like this.

from gitmerge.merge import Merger
m = Merger('USERNAME', '../PATH/TO/SOURCE/REPO', '../PATH/TO/DESTINATION/REPO', 'COMPANY_NAME')
commits = m.get_commits()
m.merge(commits)
m.push

TODOs

  • Documentation (README / Sphinx ?)
  • Unittests
  • Github Actions (workflows)
  • Command-line interface with click (more configuration options)

Help with these TODOs or good advice is greatly appreciated. For any questions open an issue.

Metadata

Release files for gitmerge 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gitmerge 0.0.6
File Size Uploaded Provenance Actions
gitmerge-0.0.6.tar.gz 10.8 kB Without provenance Details for gitmerge-0.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gitmerge 0.0.6
File Interpreter ABI Platform Actions
gitmerge-0.0.6-py3-none-any.whl Python 3 none any Details for gitmerge-0.0.6-py3-none-any.whl

Total release size: 21.3 kB

Release files / gitmerge-0.0.6.tar.gz

Download URL gitmerge-0.0.6.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ea66efeeac18955be8d3723042d2aded0b85a0512f026837a278ae96b1630ad4
BLAKE2b-256 checksum
How to use checksums
d46aefa1c3622830836d637f6a48b95ad9f2996f21f3ca4d466524a0234d5742
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / gitmerge-0.0.6-py3-none-any.whl

Download URL gitmerge-0.0.6-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5af7e00246ce1fa28a8880f3efca25038752cfecc4fc93e9877c72329dd0e7ff
BLAKE2b-256 checksum
How to use checksums
729a41d44bb919f125fbb73dfbedbb08962adad3a014deea0232cc0280d1e700
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for gitmerge 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page