I'm using git / hub with github following a gitflow workflow in my project and I'm wondering if there's a simple way to avoid entering github to merge and close my pull requests.
The worflow I'm following at the time is this one.
git checkout -b my-feature-123 develop
git add .
git commit -m "my changes"
git push origin my-feature-123
hub pull-request -m "my changes" -b develop
#enter guthub and merge PR
#run deployment
git checkout develop
git pull origin develop # everything up-to-date
So I want to replace the #enter guthub and merge PR part with a command line merging command, till now nothing seems to work.
It should be possible to merge the feature branch from the command line using git's merge command. First, you'll need to checkout the branch you are merging to which in this case is develop:
git checkout develop
git merge --no-ff my-feature-123
git push
The --no-ff is used to prevent a fast-forward merge which is the behavior you'd want for gitflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With