Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jlegrone/git-config
High-level git aliases to improve your workflow
https://github.com/jlegrone/git-config
Last synced: 2 months ago
JSON representation
High-level git aliases to improve your workflow
- Host: GitHub
- URL: https://github.com/jlegrone/git-config
- Owner: jlegrone
- License: mit
- Created: 2017-07-21T21:19:18.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-28T15:21:48.000Z (almost 4 years ago)
- Last Synced: 2024-10-19T05:42:56.148Z (3 months ago)
- Language: JavaScript
- Homepage: https://jlegrone.github.io/git-config
- Size: 3.45 MB
- Stars: 11
- Watchers: 5
- Forks: 3
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @jlegrone/git-config
[![npm version](https://badge.fury.io/js/%40jlegrone%2Fgit-config.svg)](https://badge.fury.io/js/%40jlegrone%2Fgit-config)
[![Build Status](https://travis-ci.org/jlegrone/git-config.svg?branch=master)](https://travis-ci.org/jlegrone/git-config)
[![Known Vulnerabilities](https://snyk.io/test/github/jlegrone/git-config/badge.svg)](https://snyk.io/test/github/jlegrone/git-config)[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)### Install
```
$ npm install --global @jlegrone/git-config
```### Uninstall
```
$ npm uninstall --global @jlegrone/git-config
```### Non-NPM Install
```
$ git clone https://github.com/jlegrone/git-config.git
$ cd git-config
$ git config --global --add include.path "$PWD/src/jlegrone.gitconfig"
```# Usage
To view the source for an alias, type
```bash
$ git help
```## Available Aliases
#### `git aliases`
List all available git aliases.
#### `git branches`
List all remote branches, ordered by last commit date.
#### `git contains `
List all local and remote branches containing a given commit hash.
```bash
$ git contains 27395436382cd897fd957635bd42cf78788f11b1
* feature/add-docs
master
remotes/origin/master
```
#### `git up`
Rebase the current branch onto `origin/develop`.
Rebases onto `origin/master` if no `develop` branch is present.
> Caution: This command rewrites history.
#### `git start `
Checkout a new branch based on `origin/develop`, prefixed with `feature`.
Uses `origin/master` if no `develop` branch is present.
```bash
$ git start user-service
# now on branch feature/user-service
```
#### `git hotfix `
Checkout a new branch based `origin/master`, prefixed with `hotfix`.
> Requires a `master` branch.
```bash
$ git hotfix missing-translations
# now on branch hotfix/missing-translations
```
#### `git wip`
Create a "work in progress" commit with all (staged and unstaged) changes.
#### `git undo`
Undo the latest commit. The contents of that commit will remain as staged changes.
#### `git amend`
Amend the latest commit to include all (staged and unstaged) changes.
> Caution: This command rewrites history.
#### `git fixup `
Add staged changes to the specified commit.
> Caution: This command rewrites history, and may introduce conflicts during rebase.
```bash
$ git add .
$ git fixup 27395436382cd897fd957635bd42cf78788f11b1
```
#### `git reword `
Edit the commit message for the specified commit.
> Caution: This command rewrites history.
```bash
$ git reword 27395436382cd897fd957635bd42cf78788f11b1
```
#### `git edit`
Perform an interactive rebase starting from the specified commit.
> Accepts all options that can be passed to [git-rebase](https://git-scm.com/docs/git-rebase).
> Caution: This command rewrites history, and may introduce conflicts during rebase.
```bash
$ git edit 27395436382cd897fd957635bd42cf78788f11b1
```
#### `git publish`
Push the current branch to the remote `origin`, and set it to track the upstream branch.
#### `git unpublish`
Remove the current branch from the remote `origin`.
#### `git pushf`
Force push to the upstream branch, but receive a warning if new commits were added to the remote since your last checkout.
For more information, see http://weiqingtoh.github.io/force-with-lease/.
> Accepts all options that can be passed to [git-push](https://git-scm.com/docs/git-push).
#### `git cleanup`
Delete local branches that have been fully merged into `master` or `develop`.
#### `git cb `
Checkout a new branch. Shorthand for `git checkout -b `.
> Accepts all options that can be passed to [git-checkout](https://git-scm.com/docs/git-checkout).
```bash
$ git cb test/my-proof-of-concept
# now on branch test/my-proof-of-concept
```
#### `git l`
Show an abridged `git log` output, with one line per commit.
> Accepts all options that can be passed to [git-log](https://git-scm.com/docs/git-log).
```bash
$ git l
6b1768a 2017-08-09 (tag: v1.3.3) Merge pull request #9 from jlegrone/feature/re-enable-release [GitHub]
1b0b519 2017-08-09 chore(travis): install dev dependencies again in post_success hook [Jacob LeGrone]
4b5cb73 2017-08-09 Merge pull request #8 from jlegrone/feature/fix-missing-dep [GitHub]
e5695bc 2017-08-09 fix(install): update to working validate-git-version [Jacob LeGrone]
3fab789 2017-08-09 test(travis): install production dependencies only [Jacob LeGrone]
...
```
#### `git s`
Show an abridged `git status` output which only includes files changed.
> Accepts all options that can be passed to [git-status](https://git-scm.com/docs/git-status).
```bash
$ git s
M README.md
M commitizen.config.js
M src/jlegrone.gitconfig
```