Skip to content

Instantly share code, notes, and snippets.

@gaving
Last active February 23, 2020 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaving/e8545e4d7c4512de9af1eb897324cbd7 to your computer and use it in GitHub Desktop.
Save gaving/e8545e4d7c4512de9af1eb897324cbd7 to your computer and use it in GitHub Desktop.
merge_flow.sh
#merge <commit/merge message>
#to be run in a dirty working tree on a feature branch
merge() {
g # status
# gcb $1
gca --signoff -m $1 # commit
gpsup # push branch and track remote
MR=$(lab mr create -d -a gaving -m $1 | tr -d -c 0-9) # create merge and store number
lab mr list # list
lab mr show $MR # show
# lab mr approve $MR # approve (do these work on prem?)
# lab mr merge $MR # merge (do these work on prem?)
gcm # checkout master
gfa # fetch remotes, prune old ones
ggpull # pull changes into local branch
gbda # FIXME do this safer/THIS MIGHT BURN delete ALL merged branches that arent master/develop/dev
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment