Problems connecting to MOODLE_20_STABLE BRANCH using GIT

Problems connecting to MOODLE_20_STABLE BRANCH using GIT

by Mary Evans -
Number of replies: 5
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hopefully someone can answer this question!

I've just recently started doing PULL requests using GIT with some success, I think I've done 10 and 2 have been rejected, with a couple more still in the pipeline somewhere.

Although I was aware of MOODLE_20_BRANCH I was not aware of its importance with regards PULL request in relation to updating CORE themes.

I'm pretty much a learner when it comes to GIT but with the help I have had so far, I think I am doing OK. However, this latest change in the way things have to be done, I've got myself into a black-hole namely in my GIT Bash Terminal.

In updating my Local Moodle Folder just a short while ago, with the usual checkout/pull scenario I got MOODLE_20_STABLE updated and everything seemed to be fine. But when I came to...

git push origin refs/remotes/upstream/MOODLE_20_STABLE:MOODLE_20_STABLE I got an Error message telling me no such branch existed.

Can someone please tell me what I am doing wrong?

Many thanks in advance!

Mary

Average of ratings: -
In reply to Mary Evans

Re: Problems connecting to MOODLE_20_STABLE BRANCH using GIT

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That is a very odd push command.

I think that

git push origin MOODLE_20_STABLE

is what you want to be using.

In reply to Tim Hunt

Re: Problems connecting to MOODLE_20_STABLE BRANCH using GIT

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Tim,

The "odd push command" as you call it was in a Moodle Doc Guide for Developers on how to set GIT up. It has snce been updated from how it read last week is much changed now.

Here is another question:

How does one convert a set of commands into a script to use in GIT, and how do you use such scripts?

This is one I want to create...

It comes from THIS Moodle Doc

Quote:

"...The following commands can be used to keep the standard Moodle branches at your Github repository synced with the upstream repository. You may wish to store them in a script so that you can run it every week after the upstream repository is updated.

   git fetch upstream
for BRANCH in MOODLE_19_STABLE MOODLE_20_STABLE master; do
git push origin refs/remotes/upstream/$BRANCH:$BRANCH
done


In reply to Mary Evans

Re: Problems connecting to MOODLE_20_STABLE BRANCH using GIT

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Oh, I see what that odd command is doing now. OK. It makes sense. If your clone of the official Moodle git version is called something other than 'upstream' then you will have to modify the comment. For example,

git push origin refs/remotes/moodle/MOODLE_20_STABLE:MOODLE_20_STABLE

the output of git remote -v should help you track down the right remote name.

 

This bit about making is script is about Linux command-line wizardry. David Mudrak wrote that. I don't know.

In reply to Tim Hunt

Re: Problems connecting to MOODLE_20_STABLE BRANCH using GIT

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Thanks,

In that case I need not worry about writing scripts. I thought it must be something similar, or a .bat file in MS-DOS.

Thanks for the help.

Mary

In reply to Mary Evans

Re: Problems connecting to MOODLE_20_STABLE BRANCH using GIT

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yes, exactly.