Package: gitchm
gitchmA CLI tool that lets you replicate a git repo's commit history without reproducing the working tree. It works by creating commits in the destination repo using the details (author, committer, timestamp, and message) of commits from the source repo. Changes to the destination working tree are made only by writing the commit messages into an auto-generated text file. Files and directories from the source repo are not copied.The current version of the tool allows you to:Choose a local git repo as the source repoSpecify a local directory or git repo as the destination (or let the tool generate the destination for you)Query commits by author, committer, and timestampSelect which branch to copy commits from as well as which branch to copy commits intoCurrent Version0.1.0RequirementsPython>= 3.8+Git1.7.0 or newergitpython>=3.1.3Please seerequirements.txtanddev-requirements.txtfor full list of dependencies.InstallationCreate and activate a virtual environmentRun the following:$pipinstallgit+https://github.com/ralphqq/gitchmUsageMake sure that the virtual environment where you pip installed gitchm is activated. Then run:$gitchmThe tool then asks you to enter the following details:Path to source repository:The absolute path to the directory containing the source repository. This is a required item, and the path must point to a valid git repo.Path to destination repository:The absolute path to the destination repository. This is an optional item. If not provided, a new directory will be generated for you. The value can be a path to a non-existent directory (in that case, it will be created); a path to an empty or valid git repo; or a path to a directory that has previously been used as a destination repo.Prefix to identify auto-generated destination directory:Prefix to be pre-appended to the auto-generated destination repo. This item is optional. If not provided, the string 'mirror-' will be pre-appended to the name of the source directory in order to create the destination folder.Author name or email to query commits:All or part of the commit author's name or email address. This item is optional and is not case sensitive.Committer name or email to query commits:All or part of the committer's name or email address. This item is optional and is not case sensitive.Query commits before date/time:Date/Time string of the form yyyy-mm-dd HH:MM:SS (time component can be excluded). This item is optional.Query commits after date/time:Date/Time string of the form yyyy-mm-dd HH:MM:SS (time component can be excluded). This item is optional.Branch in source repo to get commits from:Name of branch in source repo. This is optional. If not provided, the currently active branch is used.Branch in destination repo to copy commits into:Name of branch in destination repo. This is optional. If not provided, the currently active branch is used.Development SetupClone this repoCreate and activate a virtual environmentInstall the development dependencies:$pipinstall-rdev-requirements.txtRun the test suite:$pytestContributingFork this repoClone your fork into your local machineFollow steps in Development Setup but skip step 1Create your feature branch:$gitcheckout-bfeature/some-new-thingCommit your changes:$gitcommit-m"Develop new thing"Push to the branch:$gitpushoriginfeature/some-new-thingCreate a pull requestLicensegitchm is available under theMIT License.