Did not work if only the branch was cloned Originally I had cloned with > git clone --depth=1 --single-branch -b MOODLE_28_STABLE git://git.moodle.org/moodle.git moodle_code Therefore the new branch was not available. I had to > git remote set-branches --add origin MOODLE_31_STABLE > git fetch --depth=1 > git checkout -b MOODLE_31_STABLE --track origin/MOODLE_31_STABLE Why should I pull after the git checkout? Of course I need to pull when I want to update within the branch (MOODLE_31_STABLE) Reply
Originally I had cloned with
> git clone --depth=1 --single-branch -b MOODLE_28_STABLE git://git.moodle.org/moodle.git moodle_code
Therefore the new branch was not available. I had to
> git remote set-branches --add origin MOODLE_31_STABLE
> git fetch --depth=1
> git checkout -b MOODLE_31_STABLE --track origin/MOODLE_31_STABLE
Why should I pull after the git checkout? Of course I need to pull when I want to update within the branch (MOODLE_31_STABLE)