HOSTING : 3. Dev workflow

Init branch,. Create a new working branch in local. Edit files. Commit your changes. Repeat. And deploy 

Init branch

Check other available branche.

git branch

It shows us only master.

Check other branches. 

git branch -a

-a show us the hidden branches

 

To clone the other branches (needed to merge)

git checkout -b {branchName} origin/{branchName}

You are automatically positioned on branch {branchName}.

Dev branch

  1. Branch

    Create a new branch in local

    git branch dev-{featureName}

    dev-{featureName} the branch where you will work

  2. Switch to the dev branch

    git checkout dev-{featureName}

    how to display the branch where your are working in, see tricks



  3. sdfdsfsdf
  4. Edit your files and commit your changes

 

Commit changes

This is the iterative commandos :
git status > git add modified:fileX > git commit -m 'message'

 

  1. Check if files are modified or added

    git status
  2. Check the differences, if everything OK

    git diff {file1} {file2} {fileX}

    if everything OK go ahead.

  3. Add files

  4. Check status
  5. Commit to the branch

 

Merge/ Cherry Pick