Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purpose of core stage command? #232

Closed
togume opened this issue Mar 6, 2019 · 2 comments
Closed

Purpose of core stage command? #232

togume opened this issue Mar 6, 2019 · 2 comments

Comments

@togume
Copy link

togume commented Mar 6, 2019

Excited to try git reflow as a tool for our team. Quick question, someone found the stage command, but there's no information on it on the base README and the workflow help states Merge and deploy a feature branch to a staging branch.

How is the stage command supposed to be used? In our use case we'd thought about deploying the current feature branch to a staging environment and don't quite grasp the value of the stage command. The one way we thought it might be helpful is in the case where we want to stage and test multiple feature branches all at once before promoting to master. I'd be happy to document the usage once I understand it better.

@nhance
Copy link
Member

nhance commented Mar 6, 2019

The goal of this is to merge the feature branch into staging and kick off the deploy from the command line. It's intent is that teams don't always have CD setup for staging (or oftentimes production) so this lightweight command allows you to put some structure behind the staging process.

With git reflow philosophy, staging is a disposable branch, meaning it should be thought of as something that can be recreated at any time, allowing it to be used for exploratory or experimental work as needed. It is fully intended that in-progress branches can be put into staging so we utilize a regular merge (not squash) for staging, as it is impossible to know when work is complete before it has passed through staging.

Only on merge to master does our default process use a squash merge. Because only at that point can you confidently combine changes into a single atomic commit.

stage runs off the following workflow:
https://github.com/reenhanced/gitreflow/blob/master/lib/git_reflow/workflows/core.rb#L250

which has a dependency on the deploy command, which you can see here:
https://github.com/reenhanced/gitreflow/blob/master/lib/git_reflow/workflows/core.rb#L220

deploy will ask for the command used to deploy on first run if it doesn't exist and uses that to execute deploys. Note that you can have a unique command for each environment, but only a single command is accepted.

@togume
Copy link
Author

togume commented Mar 6, 2019

@nhance - great response. Thanks for taking the time to explain this. I'm going to close this issue because it's now comprehensive enough and available for anyone that takes the time to look for the stage command.

@togume togume closed this as completed Mar 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants