Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matt-taylor/git-shortcuts
https://github.com/matt-taylor/git-shortcuts
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/matt-taylor/git-shortcuts
- Owner: matt-taylor
- Created: 2022-01-24T06:00:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T05:32:41.000Z (3 months ago)
- Last Synced: 2024-11-10T03:36:33.384Z (2 months ago)
- Language: Shell
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GitShortcuts
Git shortcuts is a side projects to aid in Git commands.
## Setup
Setup should be a breeze.1. Clone the repo locally
2. Run the install command in the cloned repo to install it in your local $PATH. If your path is non-standard, set the path with the --bin option
```bash
./install # with standard $PATH
./install --bin /path/to/your/bin # when path is not /usr/local/bin
```## Usage
### Get started
After setup, `gs` is installed globally. Type `gs` in any console to get self documented version of all git shortcuts### Common Commands:
**Note: All Commands are self doucmented.**
```bash
# Commit
gs commit -f . -m 'Commiting all files'# Commit with push
gs commit -f . -m 'Commiting all files' -p# Push local comits to remote
gs push# Merge remote main into local branch and use stash
gs merge-main# Merge remote branch into local branch and use commit's
gs merge-main -c -f . -m 'preparing main merge' -b some_branch```
## Development
### What is a script
When you want to have a complex action that includes multiple commands, a script should be used. A Script can call other commands or other scripts
### What is a command
A command is intended to be simple. Commands should be minimal in length and tend to be heavily used by multiple scripts. Commands should not contain scripts and try to refrain from using other commands.
### Create
Create of a new script or command is super simple.
```bash
# Create a new script
./create -f script_name -s# Create a new command
./create -f command_name -c```