Git pull question - commit or stash how to?

Git pull question - commit or stash how to?

by Jerry Lau -
Number of replies: 5

So I installed version 2.5.1+ and it's working great via git.

Now I want to update it by entering the command "git pull" and got a warning/error.


[user@myserver ~]$ cd /var/www/html/moodle
[user@myserver moodle]$ sudo git pull
[sudo] password for user:
remote: Counting objects: 2283, done.
remote: Compressing objects: 100% (326/326), done.
remote: Total 1447 (delta 1085), reused 1431 (delta 1080)
Receiving objects: 100% (1447/1447), 394.51 KiB | 457 KiB/s, done.
Resolving deltas: 100% (1085/1085), completed with 315 local objects.
From git://git.moodle.org/moodle
   863d00c..b87b729  MOODLE_23_STABLE -> origin/MOODLE_23_STABLE
   cd08b5c..a3d12f9  MOODLE_24_STABLE -> origin/MOODLE_24_STABLE
   f171a8c..a9657ad  MOODLE_25_STABLE -> origin/MOODLE_25_STABLE
   bdd045c..a31e811  master     -> origin/master
Updating f171a8c..a9657ad
error: Your local changes to 'badges/lib/backpacklib.php' would be overwritten by merge.  Aborting.
Please, commit your changes or stash them before you can merge.

Thoughts?

 

 

 

Average of ratings: -
In reply to Jerry Lau

Re: Git pull question - commit or stash how to?

by Jerry Lau -

git commit -a

Is this right?

or

I have to add all the modified files before I commit anything.

git add -A or git add --all

After that, I can use commit all the added files

    git commit

with this, I have to add the message for this commit.

git coa "my changes are upgrade to build 20130802 blah, blah....."

Am I in the right track?

 



 

In reply to Jerry Lau

Re: Git pull question - commit or stash how to?

by Jerry Lau -

I think I figured it out now ...

git commit -a -m 'merge branch first time'

then git pull

 

 

 

 

In reply to Jerry Lau

Re: Git pull question - commit or stash how to?

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

Well, before merging or committing anything, it would have been a good idea to find out what changed.

git status

git diff

would have shown you that. If the changes were trivial, you could have removed then (git checkout badges/lib/backpacklib.php) instead of committing them.

Anyway, you got your problem solved.

In reply to Tim Hunt

Re: Git pull question - commit or stash how to?

by Jerry Lau -

Thank you Tim. Yes, I read about git status which tells me or gives me a hint on the stage they are in and then what to do next.

By the way, where in Moodle Tracker can we get (or maybe there is no such thing) a list (preferably a download of a spreadsheet or delimited file of some sort) where we could test all the functionality after an upgrade so we could check these areas off before we put them into production?

Does moodle.org have their own checklist of all the functionality & areas they wish to test before they release it to the public? This is what I am look for so we could the same thing on our end?

Thanks

 

 

 

 

In reply to Jerry Lau

Re: Git pull question - commit or stash how to?

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

What an excellent set of questions:

There is a digested list of what has changed in each release in the release notes: http://docs.moodle.org/dev/Moodle_2.5_release_notes

That always contains a link to the full list of changes in the tracker: https://tracker.moodle.org/secure/IssueNavigator!executeAdvanced.jspa?jqlQuery=project+%3D+mdl+AND+resolution+%3D+fixed+AND+fixVersion+in+%28%222.5%22%29+ORDER+BY+priority+DESC&runQuery=true&clear=true but unless you are very patient, a list of 718 issues is pretty useless. You can download those issues in various forms using the 'Views' menu in the top right.

Moodle provides demo.moodle.net (running the latest stable version, currently 2.5.1+) and qa.moodle.net (running the latest development version, 2.6 dev or master) where you can always try out the latest functionality.

Before each major release, there is a big effort to get people to help with testing Moodle. See http://docs.moodle.org/dev/QA_testing. That uses this list of testcases: https://tracker.moodle.org/browse/MDLQA-1. There is also a lot of automated testing, so the list of many test-cases was actually shorter for 2.5 than it was for 2.4.