https://github.com/hudson-newey/2g
A custom git wrapper that extends Git with some custom commands that I find useful (and improves performance)
https://github.com/hudson-newey/2g
cli git
Last synced: over 1 year ago
JSON representation
A custom git wrapper that extends Git with some custom commands that I find useful (and improves performance)
- Host: GitHub
- URL: https://github.com/hudson-newey/2g
- Owner: hudson-newey
- Created: 2024-07-21T04:05:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T12:40:56.000Z (almost 2 years ago)
- Last Synced: 2025-02-27T00:53:53.014Z (over 1 year ago)
- Topics: cli, git
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 2g
## Description
A custom git wrapper that extends Git with some custom commands that I find
useful.
Any commands that are not a custom command is automatically passed to Git.
Git should have full functionality (including using vim to edit commit message).
## Custom Commands
- `2g explore `
Allows you to explore a Git repo without polluting your directories.
- `2g install `
Clones a repository in `~/.local/bin` and adds the repository to your `PATH`
environment variable.
Note: You will have to reload your shell to use any programs/scripts that
were installed.
- `2g clone-file /`
Similar to the patched clone command, using `clone-file` allows you to clone
a single file from a git repository. Without any Git history attached.
- `2g cache-clone `
A more optimized version of `git clone` that will attempt to use a local
cache of the repository and update it instead of cloning an entire repo
from scratch.
Additionally, it will fetch git history in the background, meaning that you
will have access to all the repositories code, and (hopefully) by the time
that you push, all the git history will have been fetched.
## Patched Commands
- `2g clone /[file_path]`
By adding a file path to a clone command, you are able to clone a single
file from a git repository.
Warning: This file will not have any Git history attached to it because it
was not cloned as part of a repository.
Example: Clone the CUDA .gitignore file into your repository you would
run `2g clone https://github.com/github/gitignore/blob/main/CUDA.gitignore`