Skip to content

Instantly share code, notes, and snippets.

@mauriciomassaia
Last active November 15, 2021 23:37
Show Gist options
  • Save mauriciomassaia/175d2855b72e4de008d331063d225a16 to your computer and use it in GitHub Desktop.
Save mauriciomassaia/175d2855b72e4de008d331063d225a16 to your computer and use it in GitHub Desktop.
Git Release

Create a new branch from development:

git checkout -b release/[new version here]

git checkout -b release/1.0.0

tip: run cat package.json| grep version to check the current version before creating the release branch.

Then bump the version [ major | minor | patch | premajor | preminor | prepatch | prerelease [--preid=<prerelease-id> ]

npm version major

Merge the release branch into development and main:

git checkout development
git merge release/0.1.0
git push origin development

git checkout main 
git merge release/0.1.0
git push origin main

Push tag to remote

git push origin [tagname]

git push origin v1.0.0

Delete release branch

git branch -d release/1.0.0
@mauriciomassaia
Copy link
Author

@sfjohnson I added the steps to push to developement and main after the merge. Thanks for the tip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment