gitdir

command module
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

gitdir

a tiny little tool for organizing local git repos - immensely inspired by the old $GOROOT. that's it 🤷‍♀️

establishes a root directory that will hold git repos. within this root directory, repos are placed in directories that mirror the clone urls. clone url is normalized to a stable directory path and the cloned repo is placed in a deterministic location

install

  • install the binary
go install github.com/therealkevinard/gitdir@latest 
  • setup profile: add source <(gitdir init) to your .profile.
    this script sets the $GITDIR_COLLECTION_ROOT to default $HOME/Workspaces if it's unset, and creates the directory if it doesn't exist.
    it also creates the fzf alias that makes gitdir cd pleasant.
  • cd can also be achieved with cd $(gitdir ls -dirs | fzf). the -dirs flag returns absolute paths, which can be passed directly to cd

subcommands

Usage: gitdir <flags> <subcommand> <subcommand args>

Subcommands for navigation:
	cd               root-aware cd. move into a local gitdir directory
	ls               list local repositories
	open             open repo in browser

Subcommands for repo management:
	clone            clone a remote repo url

Subcommands for support:
	commands         list all command names
	flags            describe all known top-level flags
	help             describe subcommands and their syntax
	init             initializes shell env

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cd
Package cd holds the command for changing directories to a git repo.
Package cd holds the command for changing directories to a git repo.
ls

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL