• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

How to download the different branches

Scheduled Pinned Locked Moved
Tutorials
3
7
3.3k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    sudburr
    last edited by Jan 24, 2017, 6:56 PM

    What are the different development and release branches of FOG and how does one download each?

    [ Standing in between extinction in the cold and explosive radiating growth ]

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Jan 24, 2017, 8:05 PM

      Branches in GIT allow developers to separate code into elements while leaving other elements alone.

      Typical structure for a repo in GIT will have at least 2 branches.

      The first branch is typically master. This is the “top” level branch typically containing the current “stable” software version.
      The second branch can be named nearly anything, and essentially would be akin to subversion’s trunk. Some GIT repos model their repos off of this and have a trunk branch. This might be where the next development work is at.

      FOG’s structure is:

      master The current stable release.
      dev-branch the current RC release.
      working-1.3.4 the development for the 1.3.4 version (currently.
      newIpxeGeneration A branch where I’m refactoring ipxe menu generation.
      persistentGroupPlugin A branch where i am (kind of?) working on a new model to the persistent group sql trigger stuff.

      In git you clone a repo with a command like:
      git clone https://<url>/<repoowner>/<reponame>[.git]
      For fog this would be:
      git clone https://github.com/fogproject/fogproject.git (The .git part is optional but normal to add as well.)

      This will download whatever is the “default” branch to download. In FOG’s perspective, the default is master (now).

      You do not need to “clone” the repo every time, it is only needed to initially download the repository information if you have not done so already.

      If you’ve already retrieved the repo, you just cd into the base path. More often this might be /root/fogproject.

      Once in the base path you can change branches. To get a list of all branches available you would run
      git fetch --all

      To view available branches run:
      git branch The one with the * is the branch you’re currently on.

      To switch to one branch or another run:
      git checkout <branchname>

      So to switch from the master to dev-branch in our scenario you would run:
      git checkout dev-branch

      Hopefully that helps answer that.

      As a word of caution I’d also highly recommend always running git pull when you change in and out of branches. This will pull in any new changes.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 3
      • S
        sudburr
        last edited by Jan 25, 2017, 4:32 PM

        Thank you for this great info. How about svn or is it not being used anymore?

        [ Standing in between extinction in the cold and explosive radiating growth ]

        W 1 Reply Last reply Jan 25, 2017, 6:12 PM Reply Quote 0
        • W
          Wayne Workman @sudburr
          last edited by Wayne Workman Jan 25, 2017, 12:13 PM Jan 25, 2017, 6:12 PM

          @sudburr tom told me a while back that since 1.3.0 svn is only getting updated with releases.

          It doesn’t hurt to know how to use svn, it can be helpful. But I would recommend using git.

          You can find lots of info online about subversion (svn).

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
          Daily Clean Installation Results:
          https://fogtesting.fogproject.us/
          FOG Reporting:
          https://fog-external-reporting-results.fogproject.us/

          1 Reply Last reply Reply Quote 0
          • S
            sudburr
            last edited by Jan 25, 2017, 7:32 PM

            Thank you for the update regarding the SVN repository’s repurposing. This is all good to know.

            [ Standing in between extinction in the cold and explosive radiating growth ]

            1 Reply Last reply Reply Quote 0
            • S
              sudburr
              last edited by Feb 14, 2017, 4:30 PM

              Looks like you mean to say the following to list available branches:

              git branch -a
              

              [ Standing in between extinction in the cold and explosive radiating growth ]

              W 1 Reply Last reply Feb 16, 2017, 2:28 AM Reply Quote 1
              • W
                Wayne Workman @sudburr
                last edited by Feb 16, 2017, 2:28 AM

                @sudburr This would do the same but give dates and no-longer active branches too. The count is adjustable. This is a snippet from something I’m working on.

                git for-each-ref --count=10 --sort=-committerdate refs --format='%(committerdate:short)_%(refname:short)'
                

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post

                196

                Online

                12.1k

                Users

                17.3k

                Topics

                155.3k

                Posts
                Copyright © 2012-2024 FOG Project