Skip to content
/ greasy Public
forked from google/greasy

A set of aliases and functions for quick Git work

License

Notifications You must be signed in to change notification settings

Cypher1/greasy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Rebase (and run) Easy (GREasy)

Jay Pratt'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
gf # git ls-files | grep
gl # git log --all --decorate --oneline --graph
P # git push # (dual to p)
ph # git push origin HEAD
gcontinue # git rebase --continue / git merge --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 # from tracked branch
p $branch # git checkout $branch; git pull --rebase # from origin/$branch
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

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%