This is a git alias. To add it, edit you ~/.gitconfig
file and add the code from lines 2-21 to the file after the [alias]
line.
If the file has no [alias]
line, start a new line and include the entire .gitconfig contents.
This adds a new command for git that will push up work, checkout the staging branch, pull down the work, and push it back to the staging branch before checking out the original branch.
This will allow a second argument like git merge-staging branch-name
. In this case branch-name
would be checked out instead of develop
which is the default staging branch.