git flow commit code example
Example 1: git flow feature
git flow feature start feature_name
git flow feature finish feature_name
git push --all
Example 2: git flow release
git flow release start release_version
git flow release finish release_version
git push --all --follow-tags
Example 3: Git commands workflow
GIT Commands and sudo-order of operations (* = not neccessary)
1. Initialize git
git init <--perform in target directory
2. Create new branch
*git branch <--check branch "inventory"
git checkout -b <name> <---create AND switch to new branch
3. Once in branch of choice use the following:
*git status
git add <file name(s)>
*git diff <--check if there are any changes to commit
*git reset <--run to discard any changes
git commit -m "<message>"
4. Merge branch with master
git merge <branch name> <--i.e. "master"
*git branch -d <branch name> <--delete branch
*git branch -D <branch name> <--delete not merged branch
5. Eat pizza!
Example 4: gitflow workflow diagram
$ git checkout -b myfeature develop
Switched to a new branch "myfeature"