Skip to content

Workflow feature

KS LIM edited this page Jul 29, 2021 · 5 revisions

A. WorkFlow:

  1. Create new branch from develop branch and call it "feature-"
  2. Work on feature, committing to this feature branch
  3. Test your feature
  4. Merge your feature into develop branch
  5. Delete your feature branch
  6. Once enough features and/or fixes have been completed, prepare your release
  7. When release is tested and prepped, merge develop into master
  8. Tag master branch commit with release number
  9. Repeat

B. Create a LICENSE :

  1. $ touch LICENSE
  2. $ git add LICENSE
  3. $ git commit -m "Add License"
  4. $ git push origin main

C. Create Tag :

  1. $ git tag -a v1.0 -m "Add first tag"
  2. $ git show v1.0
  3. $ git tag to see our tag marker that is v1.0
  4. $ git push --tags origin main or master to push the tag to the remote master or main depend on your setting
  5. $ git log --oneline --decorate --graph --all
  6. How to tag an older commit in Git?
    git tag -a v1.2 9fceb02 -m "Message here"

D. Create Feature branch: if you got couple of peoples working together at the develop branch at once

E. To merge the feature branch into the develop we type

  1. checkout to the develop branch $ git checkout develop
  2. merge the feature branch into it $ git merge feat1 develop will be updated by the feature branch
  3. next is to delete the feat1 branch $ git branch -d feat1
  4. next checkout to the master or main branch $ git checkout main
  5. "$ git merge develop" this will bring the develop into the master branch
    and you will see the Fast-forward keyword it mean you move the master branch all the way to the latest commit
  6. then tag the master branch $ git tag -a v1.1 -m "Added second release tag"

Clone this wiki locally