git flow commands code example
Example 1: git flow init
#basic
git flow init
#with default to not be promted
git flow init -d
#with force to re-run init and edit data
git flow init -f
Example 2: git common commands
git init
//add all
git add .
//cancel adds
git reset
//cancel commits
git reset HEAD^
//cancel last 3 commits
git reset HEAD~3
//when first commit
git push -u origin master
//remove remote origin
git remote remove origin
//reset remote origin
git remote add origin https://github.com/yourname/project.git
Example 3: git flow feature
#Open a feature branch named: feature/feature_name
git flow feature start feature_name
#Close a feature branch
git flow feature finish feature_name
#Remember to push all branches
git push --all
Example 4: git flow release
#Starting a release create a branch release/release_version
#tipically version are Semantic Versioning standard X.Y.Z
git flow release start release_version
#Finish a release, remember to update your application version!
git flow release finish release_version
#Remember to push all branches and tags
git push --all --follow-tags
Example 5: git fklow init
git flow release finish '0.1.0'
Example 6: git basic commands
git checkout <branchname>