Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

hankchanocd/git-commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-commands    GitHub tag (latest SemVer) Build Status Commitizen friendly Github issues CodeFactor

Fuzzy search git commands with fzf

Update (2020-Mar-1)

Warning: This repository has been archived.

Since git version 1.20.0, the git help command has undergone a consistent change, that makes rewriting this repository almost an impossible task. The good news, however, is that git help -a is now much more informative, including all git commands and aliases, along with their description.

demo

Install

Clone the repo, and run npm run transfer to transfer ./git-commands to ~/bin, or manually invoke ./script/transfer.sh if you are not familiar with npm.

If you have a more desired PATH for storing scripts, configure ./script/transfer.sh directly or ignore the transfer instructions.

Requirements

Make sure fzf is installed globally. git commands won't work if fzf is not installed.

Usage

git-commands [<options>]

List all available git commands with help using fzf.
Native git commands in white, custom git commands in blue.

where:
	-h  show this help text
	-n  list only the native git commands
	-c  list only the custom git commands
	-a  list all commands, which is also default

A simple one-liner is all you need.

$ git commands

Alias git commands to something shorter - git cmd, if typing commands annoys you.

$ git config --global alias.cmd 'commands'

Now, it's just as simple as

$ git cmd

Changelog

2018-Nov-13: v1 published. Automate commit and file transfer process with commitizen and ghooks.

2020-Mar-1: Archived.

Others

See Dotfiles for my other works on git.

See git-overview - A quick git repository insight at terminal.

See git-stack - Compare against master branch with fzf.

License

MIT