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 --repohome=/home/username/ref https://gitserver.example.com/user/project

You'll probably want to keep the same repohome directory for all git projects you clone. This can be achieved by creating this pair of aliases in ~/.bashrc:

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

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.2.tar.gz (4.4 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.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for refclone-0.2.tar.gz
Algorithm Hash digest
SHA256 a44bfe29a1a6a227f5108dc726d9fed645c38df431ebe0573180b606176b3a07
MD5 a0ca2fb94adb97fc6b8d65f93bdba1e3
BLAKE2b-256 63297215a12b2bbc0042d4efb8b69ed6d98ae6d20800c1eebcc451874111de05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: refclone-0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 65c914897fab8dc0bd0be41aa3624d32607d77deafe50a6c6808567d8b06a488
MD5 15e0db27bfa5aa1407a5cd43010e1f00
BLAKE2b-256 032af35fb8b280b7e12f40373b1b0367c5394ea56bfe44c60ad97d50b3e3d38d

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