Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

google/greasy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Git Rebase (and run) Easy (GREasy)

Jopra's GIT scripts - 2022

This is not an officially supported Google product

Installation

git clone https://github.com/google/greasy.git ~/greasy

Additionally, add the following to your .zshrc:

[ -f ~/greasy/greasy.zsh ] && source ~/greasy/greasy.zsh || echo 'greasy is missing'

Usage

GREasy provides a set of aliases for quick Git work: e.g.

a file # git add file
m "$MSG" # git commit -m "$MSG"
d # git diff
D # git diff --staged
gg # git grep
gl # git ls-files | grep
p # git push # (dual to P)
continue # git rebase --continue
skip # git rebase --skip

GREeasy also provides some more complex methods that make common tasks easy.

branch # gets the current branch name
#e.g.
git push origin $(branch)
P # git pull --rebase
P $branch # git checkout $branch; git pull --rebase
PA # git pull --rebase, but for ALL branches, pausing if there are merge conflicts.
ge "$PATTERN" # greps for "$PATTERN" and opens the results in your $EDITOR.
hub # opens the current repo's remote on the web, assuming it uses a 'github like' URL format.
edit # opens all the uncommited files in your $EDITOR.
last # opens all the files in the most recent commit in your $EDITOR.
run $CMD # attempts to run $CMD in the appropriate package/tooling for this project.
# See project_type in greasy.zsh for more details.

# Aliases:
r = run  # e.g. node / cargo
t = run test # node test / cargo test
b = run build # node build / cargo build

Checkout greasy.zsh for the full list of aliases and functions that GREasy makes available.

Dependencies

  • zsh
  • git
  • grep
  • sed
  • xargs

Contributing

Please see the project's code of conduct and contributing guide.

Feel free to join GReasy's discussion group!

License

Please see the project's license.

About

A set of aliases and functions for quick Git work

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Languages