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.4.tar.gz (5.7 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.4-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for refclone-0.4.tar.gz
Algorithm Hash digest
SHA256 aebe7207e4a8e6e8efb8953c9c9992b314e828f6f6bbee49b6de8f7fddd237e6
MD5 876c0e1d281e4b1dad36aaca8183987b
BLAKE2b-256 05b6ebc81f490ef8b21ab60226020a93b7d7fe04aef9d2471ca62f1ab7f736ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: refclone-0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c7a8b0dc207faa404da74570cccb1f2f24b267309494e7c14010716a90a595a0
MD5 edc030b1a8b0e2c970d80d924ebcf7fe
BLAKE2b-256 c180aa802eb69ec69b07dcba466889fa7cf1d1804f687ed2971da7ca7b9644fa

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