mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
adding a reset button :)
This commit is contained in:
parent
8303a484e3
commit
ee4c068561
1 changed files with 6 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ function gerrit_usage {
|
||||||
echo " push Push changes without going through a review. ";
|
echo " push Push changes without going through a review. ";
|
||||||
echo " pull Pull latest changes and rebase ... or something. ";
|
echo " pull Pull latest changes and rebase ... or something. ";
|
||||||
echo " patch Work with gerrit patchset";
|
echo " patch Work with gerrit patchset";
|
||||||
|
echo " reset Reset hard to origin/master";
|
||||||
echo " review Submit changes for review";
|
echo " review Submit changes for review";
|
||||||
echo " draft Submit changes for review as draft";
|
echo " draft Submit changes for review as draft";
|
||||||
echo " setup-reviewers Set current repo to automatically have reviewers from your team";
|
echo " setup-reviewers Set current repo to automatically have reviewers from your team";
|
||||||
|
|
@ -40,6 +41,10 @@ function gerrit_draft () {
|
||||||
git push origin HEAD:refs/drafts/$1;
|
git push origin HEAD:refs/drafts/$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function gerrit_reset {
|
||||||
|
git reset --hard origin/master;
|
||||||
|
}
|
||||||
|
|
||||||
function gerrit_pull () {
|
function gerrit_pull () {
|
||||||
#git pull --rebase origin $1;
|
#git pull --rebase origin $1;
|
||||||
git fetch;
|
git fetch;
|
||||||
|
|
@ -93,6 +98,7 @@ function gerrit () {
|
||||||
[ "$1" = "patch" ] && gerrit_patch "$2"
|
[ "$1" = "patch" ] && gerrit_patch "$2"
|
||||||
[ "$1" = "push" ] && gerrit_push "$branch";
|
[ "$1" = "push" ] && gerrit_push "$branch";
|
||||||
[ "$1" = "review" ] && gerrit_review "$branch";
|
[ "$1" = "review" ] && gerrit_review "$branch";
|
||||||
|
[ "$1" = "reset" ] && gerrit_reset;
|
||||||
[ "$1" = "draft" ] && gerrit_draft "$branch";
|
[ "$1" = "draft" ] && gerrit_draft "$branch";
|
||||||
[ "$1" = "pull" ] && gerrit_pull "$branch";
|
[ "$1" = "pull" ] && gerrit_pull "$branch";
|
||||||
[ "$1" = "clone" ] && gerrit_clone "$2";
|
[ "$1" = "clone" ] && gerrit_clone "$2";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue