add 'g hist'
This commit is contained in:
parent
6bf7709865
commit
fd88c58e90
2 changed files with 7 additions and 0 deletions
|
|
@ -96,6 +96,7 @@ g log | git log --graph --pretty=format:'%h - %d %s (%cr) <%an>' --abbrev-commit
|
||||||
g ignore *file* | Adds *file* to the current .gitignore file
|
g ignore *file* | Adds *file* to the current .gitignore file
|
||||||
g submodule | Finds all git repos underneath the main repo and makes them submodules
|
g submodule | Finds all git repos underneath the main repo and makes them submodules
|
||||||
g squash *n* | Squash the last *n* commits into one commit. <ul><li> Prompts for a new commit message. </li><li> Moves HEAD without actually deleting the old commits. </li></ul>
|
g squash *n* | Squash the last *n* commits into one commit. <ul><li> Prompts for a new commit message. </li><li> Moves HEAD without actually deleting the old commits. </li></ul>
|
||||||
|
g hist | List branches you've recently visited and when (I was about to call it `g recent` but I mistyped and did `g reset`... hence the new name.)
|
||||||
|
|
||||||
#### Shortcuts
|
#### Shortcuts
|
||||||
Because sometimes you just want to type one letter.
|
Because sometimes you just want to type one letter.
|
||||||
|
|
|
||||||
6
bin/g
6
bin/g
|
|
@ -508,6 +508,12 @@ git log --color \
|
||||||
echo ''
|
echo ''
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
hist)
|
||||||
|
git reflog HEAD@{now} --date=relative \
|
||||||
|
|awk '$5 ~ /checkout:/ { sub(/HEAD@/, "", $2); sub(/:/, "", $4); if (!seen[$10]++) print $10, $2, $3, $4}'
|
||||||
|
echo ''
|
||||||
|
;;
|
||||||
|
|
||||||
submodule)
|
submodule)
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
gitroot=$(git_root)
|
gitroot=$(git_root)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue