Helps avoiding conflicts for git repositories when using multiple computers.
Project description
GitArgus
Python utility to synchronize state of git workspaces for developers who use multiple machines. Uses AWS free tier DynamoDB to store the state. Can automatically pull changes if fast-forwarding is possible. Currently version only supports Unix systems.
Installation
pip install gitargus
AWS Infrastructure setup
You can create a free AWS account and use the always-free allowance to run GitArgus. Consult AWS documentation on how to perform the required steps.
Create a DynamoDB table with a String partition key named 'hostname'. 1 read and write capacity should be enough, but turning on capacity auto scaling is recommended.
Install aws-cli to each machine you will run GitArgus on. Log in with a user and save it's credentails who has permission to write to the DynamoDB table. GitArgus will pick up these credentials.
Configuration
Create the '.gitargus' directory in your home folder, and create the configuration file 'config.yml':
hostname: machine
root: /home/user/Workspace
repositories:
- repo1
- repo2
- project1/repo1
- project2/repo1
- project2/repo2
aws:
dynamodb:
table: git
timezone: Europe/Budapest
- hostname - the name of the machine, will be used as key in DynamoDB
- root - the directory where the repositories are
- repositories - list of the repositories to handle, can handle multiple directory levels
- aws.dynamodb.table - the name of the DynamoDB table
- timezone - timezone of the timestamps, useful in case of remote machines in different timezones
Useage
You can start the process with the following command:
python -m gitargus
Either you can run manually or set up a cron job.
Logs
The log file is located at ~/.gitargus/gitargus.log
.
User Interface
The server.py file can be used for a stop-gap method to check the contents of the DynamoDB table. First install uvicorn, then run it with uvicorn server:app
. Then use the url http://127.0.0.1:8000/{hostname}
to access the json response. This is a temporary solution and will be removed before realese.
A MacOS/iPadOS/iOS application is in the very early stages of development.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for gitargus-1.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5826fcdb7f06f817e97893a3aaf6f0ff4d3dbce4751d83f4a934bc82e1418d0 |
|
MD5 | 23e671192e56a5df8b02abe283dff596 |
|
BLAKE2b-256 | 2e432ebc47944e90b423d4fbb8b8812716d45c8b102753ca5257d8c1c66645c2 |