dynamic doughnut graph using laravel vue component

Dynamic Doughnut Graph Using Laravel Vue Component

May 24, 2021
how to charge for a website

How To Charge For A Website

June 7, 2021

A Simple And Powerful Git Version Control Workflow

May 31, 2021 / Adam Purdon

This Git workflow can be used collaboratively or individually. This workflow will; ensure your individual changes are be preserved, makes sure that the main branch is always in a state which can successfully compile.

 

The goals of committing are to:

 

  1. Commit as often as you can as you can, as you have accomplished a reasonable amount of progress that can be described.
  2. Only commit if your project can be compiled.
  3. For your commit to be as small as possible, and for the message to describe what has been done.

 

So let’s describe the git workflow:

 

This assumes your git repository is initialised and that your main line of development is called master, and that your remote is origin.And we are develeloping a feature called login.

  1. Create a private branch – this branch will stay on your local machine and will not be pushed to the remote, we can call this branch the same name as our feature.

    git branch login

  2. Switch to your branch – this is where we will do our development related to the feature, until we are ready to add the feature into the main line of development (master branch).

    git checkout login

  3. Continue to develop your login feature here, making commits according to the goals above
    1. Commit all your work the the branch

      git add .

      git commit -m ‘your description for the commit’

    2. Fetch and rebase changes from the remote to this branch. Git pull will operate on the node that HEAD points to, so you must be on your private branch login

      git pull origin master --rebase

  4. When you have finished developing your feature and have nothing left to commit, we can add our feature to the main line of development (master branch)
    1. Fetch and rebase the changes, again for your private branch

      git pull origin master --rebase

    2. Checkout to the main line of development

      git checkout master

    3. Merge your work on the private branch to the main line of development (master branch). This will always be a fast-forward commit, meaning you will not have a separate commit for the merge, nor will you have any conflicts!

      git merge login

    4. Push to your remote

      git push origin master

    5. Delete your private branch (If you want to)

      git branch -d login

  5. If you’re ready to start a new feature. Go back to step 1!
Share

Adam Purdon

Adam is a full stack web developer, who specialises in modern front end front-end frameworks as well as NodeJs and Laravel.

✕
A Simple And Powerful Git Version Control Workflow
This website uses cookies to improve your experience. By using this website you agree to our Data Protection Policy.
Read more