git checkout master // Switch to master
git update // Update master
git checkout -b NEW-FEATURE // Start a new feature
[...] // Working
git commit // Commit changes
git draft feature // Publish changes as draft with the label "feature" (default: bugfix)
[...] // Working
git patch // Amend changes to last commit
git publish feature // Publish changes with the label "feature" (default: bugfix)
Last active
May 24, 2016 15:35
-
-
Save yannickcr/1db3517152de5d9b2199 to your computer and use it in GitHub Desktop.
Git Alias for Gerrit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
patch = commit --amend --no-edit --reset-author | |
yolo = commit --amend --no-edit --reset-author --no-verify | |
update = pull --ff-only | |
draft = !sh -c 'git push origin HEAD:refs/drafts/master/${1-bugfix}' - | |
publish = !sh -c 'git push origin HEAD:refs/for/master/${1-bugfix}' - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment