Skip to main content

A wrapper for "git clone" that keeps git repo directories organized

Project description

Refclone

refclone is a wrapper for git clone command that keeps cloned git repositories organized.

Installation

pip3 install --user git+https://alcm-b@bitbucket.org/alcm-b/refclone.git

Usage

refclone.py https://gitserver.example.com/user/project

The above will clone the repository into a default location, ~/ref and create subdirectories, so the full path will be ~/ref/gitserver.example.com/user/project

refclone.py --repohome=/home/username/ref https://gitserver.example.com/user/project

You may use other default directory by supplying --repohome argument. To keep the same repohome directory for all git projects you clone, set this pair of aliases in ~/.bashrc:

alias refclone='refclone --repohome=/home/username/projects'
alias cdref='cd /home/username/projects'

After that, you can start using refclone like this:

refclone https://gitserver.example.com/user/project
cdref
cd gitserver.example.com/user/project
# start exploring the code

Description

refclone ensures that all git repositories I clone are located in the same place, nicely organized by server url, user and project name. It also shaves off a couple of commands I have to run each time I want to take a look at the source code of one more open source project.

Effectively, this utility is a shortcut for these two UNIX shell commands:

mkdir -p "/<repohome>/<server-url>/<username>/<project-name>/"
git clone <git-url> /<repohome>/<server-url/<username>/<project-name>/

, where <repohome> is provided in command line option --repohome.

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

refclone-0.5.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

refclone-0.5-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file refclone-0.5.tar.gz.

File metadata

  • Download URL: refclone-0.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for refclone-0.5.tar.gz
Algorithm Hash digest
SHA256 7c67614f672eeab48faac9ed8b20ee41dda225ef6c8f98c2010c0f76d9df5d4a
MD5 79beb58aa8c73812167d11f869ebb5f2
BLAKE2b-256 149d89f6a0e8f6c7327f87dceae2d589d347241c85348362642f929ab8e14d20

See more details on using hashes here.

File details

Details for the file refclone-0.5-py3-none-any.whl.

File metadata

  • Download URL: refclone-0.5-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for refclone-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 62748a9c8327d5a3873cda86555717cda96dc287ea07dde4997904f3a546cee9
MD5 33cd573b21f12d0443c7be9b4cbbff53
BLAKE2b-256 33047ceea1cecd4a2fa5d140077f46e3fafaf204a2039ce4b4d36fdf2daabe02

See more details on using hashes here.

Supported by

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