add got-sync, update docs

This commit is contained in:
Aaron Bieber 2020-08-24 14:54:37 +00:00
parent 17e9dde6e6
commit 3c06bc9d76
2 changed files with 13 additions and 3 deletions

View File

@ -16,6 +16,14 @@ function got-push {
(cd "$r" && git push "$@")
}
function got-sync {
local _remote
_remote=$1
[ -z $_remote ] && _remote="origin"
got fetch "$_remote" && got update -b "$_remote/master" && \
got rebase master
}
function __got_ps1 {
local _format _branch _status
_format=$1

View File

@ -3,6 +3,8 @@
This extension adds helper functions to the [[https://gameoftrees.org/][got]] tool.
| Function | Description |
|------------+-------------------------------------------------------------------------|
|-------------+-------------------------------------------------------------------------|
| ~got-push~ | Pushes (~git push~) from the bare repository found in ~.got/repository~ |
| ~got-sync~ | Rebase ~master~ on top of ~[remote]/master~. Defaults to ~origin~. |
| ~__got_ps1~ | Current got branch. Intended to be used in ~$PS1~. |