switchon@lavalamp.biz
+27(0) 83 419 4851 / +27(0) 21 036 1165
Application & software development
Get A Quote

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact

    • Home
    • Services
      • Application & software development
      • Outsourced software development
      • Project based resourcing
      • Digital marketing & consulting
      • Graphic design & consulting
      • UI / UX design & consulting
      • Recruitment services
      • Lease an expert
    • About
      • How we work
      • NBConsult Group
      • Partners
      • Lightbox Digital
    • Blog
    • Join us
    • Contact
    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
    Jun 7, 2021

    A Simple And Powerful Git Version Control Workflow

    git version control
    git version control

    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!

    Contact us


      Related posts:

      how to setup git-ftp for windowsHow To Setup Git-ftp For Windows git workflow with multiple peopleGit Workflow With Multiple People how to deploy your app/website on herokuHow To Deploy Your App/Website On Heroku development teamThe Weird And Beautiful JavaScript Language
      Share
      82
      Adam Purdon
      Adam Purdon
      Adam is a full stack web developer, who specialises in modern front end front-end frameworks as well as NodeJs and Laravel.

      2 Comments

      1. Mitchell says:
        Jun 16, 2021 at 10:47 pm

        Great topic and interesting concept on rebasing a branch to the main line rather than a traditional approach of merging a branch in.

        Reply
        • Adam Purdon says:
          Jun 16, 2021 at 10:59 pm

          Thanks! We are rebasing the main branch onto our private branch, then merging our private branch back into main. This way it’ll always be a fast forward commit with no conflicts when we merge. Rebasing our private branch to the master would cause a change to the master branch, something we don’t want until our feature is done… then we just merge the two.

          Reply

      Leave a Reply Cancel reply

      Your email address will not be published. Required fields are marked *

      Lava Lamp Lab


      Like technology, a lava lamp constantly changes form, producing new conditions with every passing moment



      lava lamp lab facebook   lava lamp lab twitter   lava lamp lab linkedin   lava lamp lab instgram

      Services


      Application & software development

      Outsourced software development

      Project based resourcing

      Digital marketing & consulting

      Graphic design & consulting

      UI / UX design & consulting

      Contact Us


      +27(0) 83 419 4851

      +27(0) 21 036 1165


      switchon@lavalamp.biz


      Unit 1 Monaco Square,
      14 Church Street,
      Durbanville,
      Cape Town, 7550

      NBConsult Group


      nbconsult
      nbconnect msp
      nbclearning
      river broadband
      designer needed
      © 2023 Lava Lamp Lab (Pty) Ltd | All Rights Reserved | Privacy Policy
      Contact us now

        Application & software development

          Outsourced software development

            Project based resourcing

              Digital marketing & consulting

                Graphic design & consulting

                  UI/UX design & consulting

                    Lease an expert

                      Recruitment services

                        We are using cookies to give you the best experience on our website.

                        You can find out more about which cookies we are using or switch them off in settings.

                        Lava Lamp Lab
                        Powered by  GDPR Cookie Compliance
                        Privacy Overview

                        This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

                        Strictly Necessary Cookies

                        Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

                        If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

                        3rd Party Cookies

                        This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

                        Keeping this cookie enabled helps us to improve our website.

                        Please enable Strictly Necessary Cookies first so that we can save your preferences!

                        Cookie Policy

                        More information about our Cookie Policy