Skip to main content

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.

Release files for refclone 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 refclone 0.6
File Size Uploaded
refclone-0.6.tar.gz 6.2 kB Details

Built distribution (wheel)

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

Total release size: 10.5 kB

Release files / refclone-0.6.tar.gz

Download URL refclone-0.6.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f618e6fc3b7aa7a1062094854b095b05c999c0de846a74218f6b802717dc47fa
BLAKE2b-256 checksum
How to use checksums
be84fa117352056ed831ab0df8725aa438df1396469e53f09d4ef25588e69e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / refclone-0.6-py3-none-any.whl

Download URL refclone-0.6-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
237290ceac48bc7688b1634873c3f3bfc31a31d9746c6af84d5611f454c17d42
BLAKE2b-256 checksum
How to use checksums
fe0256846319dc4f302be82b2e838fb2bbd50628009ed37a173fef21649a2452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.6 This release

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

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