A tiny git command wrapper for view git commits.
commands:
git jump 100
: jump to 100th commit (git j
for short)git jump +10
: jump 10 commits newergit jump -10
: jump 10 commits oldergit jump 03308b1a
: jump to commitid starts with 03308b1agit next
(git n
for short): jump to next commit (equivalent togit jump +1
)git prev
(git p
for short): jump to previous commit (equivalent togit jump -1
)git first
: jump to oldest commit (equivalent togit jump 1
)git last
: jump to most recent commit (equivalent togit jump 0
)
Usage:
- load
$ wget --no-check-certificate https://raw.githubusercontent.com/wuxc/gitjump/master/gitjump.sh
$ source ./gitjump.sh
or add it to your ~/.bashrc:
# for Mac
$ echo "source `pwd`/gitjump.sh" >> ~/.bash_profile
# for Linux
$ echo "source `pwd`/gitjump.sh" >> ~/.bashrc
- fire
$ cd some/awesome/repos.git
$ git first
$ git n; git status
$ git diff
......
Have fun!
Tested on bash/zsh on mac OS.
Please create an issue if you find anything wrong or have a suggestion.