Compare commits
2 Commits
8f653dce4e
...
467789389a
Author | SHA1 | Date | |
---|---|---|---|
467789389a | |||
dcacddc27f |
11
README.md
11
README.md
@ -15,6 +15,8 @@ than remember the plumbing term of a specific command.
|
||||
* `delete` deletes an existing branch, shorthand for `git branch -D`.
|
||||
* `name` the name of the current branch.
|
||||
* `last` the name of the last branch checked out before the current branch.
|
||||
* `checkout-last` checkout the last branch, shorthand for
|
||||
`git checkout $(git last)`.
|
||||
* `publish` push and set the tracking branch of a local branch to origin,
|
||||
shorthand for `git push -u origin <branch>`.
|
||||
* `unpublish` delete a remote branch, shorthand for `git push origin :<branch>`.
|
||||
@ -23,9 +25,10 @@ than remember the plumbing term of a specific command.
|
||||
* `changes` compare the list of commits on the local branch to another branch,
|
||||
e.g. when on a feature branch `git changes master` lists the commits which are
|
||||
not present on the master branch.
|
||||
* `save` like pushing to the stash but attached to a branch, shorthand for
|
||||
`git commit -am temp`.
|
||||
* `load` like popping from the stash but attached to a branch, shorthand for
|
||||
`git reset --mixed HEAD`.
|
||||
* `save` like pushing to the stash but attached to the current branch, shorthand
|
||||
for `git commit -am "temp!"`.
|
||||
* `load` like popping from the stash but attached to the current branch, if
|
||||
`HEAD` has the subject `temp!` then `git reset --mixed HEAD~` is executed,
|
||||
otherwise the message `error: commit subject is not: temp!` is output.
|
||||
|
||||
[git]: https://git-scm.com
|
||||
|
6
config
6
config
@ -11,6 +11,7 @@
|
||||
delete = branch -D
|
||||
name = rev-parse --abbrev-ref HEAD
|
||||
last = !sh -c 'git reflog | grep \" checkout: moving from\" | head -n 1 | awk \"{ print \\$6 }\"'
|
||||
checkout-last = !git checkout `git last`
|
||||
|
||||
publish = !git push -u origin `git name`
|
||||
unpublish = !git push -u origin :`git name`
|
||||
@ -20,8 +21,9 @@
|
||||
tree = log --graph --abbrev-commit --oneline --decorate \
|
||||
--format=format:'%C(yellow)%h%C(reset) %C(blue)%aD%C(reset) %C(green)(%ar)%C(reset)%C(bold)%d%C(reset)%n %C(white)%s%C(reset) %C(dim white)- %an%C(reset)'
|
||||
|
||||
save = commit -am temp
|
||||
load = reset --mixed HEAD~
|
||||
save = commit -am "temp!"
|
||||
load = !sh -c '[ \"temp!\" = \"`git show --format=%s --no-patch`\" ] && \
|
||||
git reset --mixed HEAD~ || echo \"error: commit subject is not: temp!\"'
|
||||
|
||||
[commit]
|
||||
verbose = true
|
||||
|
Loading…
x
Reference in New Issue
Block a user