git pull error

git pull error

by Jerry Lau -
Number of replies: 1

Hello there,


When I tried to do a git pull, I get this error, which I have not seem before


error: Untracked working tree file 'blocks/blog_tags/tests/behat/blogtag.feature' would be overwritten by merge.  Aborting


This is what I have done:

[me@myserver moodle28]$ git pull

error: Your local changes to 'blocks/blog_tags/tests/behat/blogtag.feature' would be overwritten by merge.  Aborting.

Please, commit your changes or stash them before you can merge.


then I stashed ..

[me@myserver moodle28]$ git stash

Saved working directory and index state WIP on MOODLE_28_STABLE: 5e1af03 change admin/auth_config.php for 2.8.11 upgrade

HEAD is now at 5e1af03 change admin/auth_config.php for 2.8.11 upgrade


then I do a git pull and this is now what I have


[me@myserver moodle28]$ git pull

CONFLICT (rename/delete): Rename install/lang/sr/langconfig.php->lib/flowplayer/flowplayer.controls-3.2.16.swf.php in 3ed9d1c176a0ffabc2b395a026e80f9435775c7d and deleted in HEAD

CONFLICT (rename/delete): Rename install/lang/sr_cr_bo/langconfig.php->install/lang/oc_gsc/langconfig.php in 3ed9d1c176a0ffabc2b395a026e80f9435775c7d and deleted in HEAD

Auto-merging admin/auth_config.php

Auto-merging admin/environment.xml

CONFLICT (content): Merge conflict in admin/environment.xml

Auto-merging admin/index.php

Auto-merging admin/registration/register.php

Auto-merging admin/reports.php

Auto-merging admin/search.php

Auto-merging admin/settings.php

Auto-merging admin/settings/appearance.php

....

CONFLICT (content): Merge conflict in blocks/tag_youtube/lang/en/block_tag_youtube.php

Auto-merging blocks/tag_youtube/version.php

Auto-merging blocks/tests/behat/restrict_available_blocks.feature

...

CONFLICT (content): Merge conflict in grade/report/grader/module.js

Auto-merging grade/report/overview/lib.php

....

Auto-merging lang/en/error.php

CONFLICT (content): Merge conflict in lang/en/error.php

Auto-merging lang/en/grades.php

...

Auto-merging lib/editor/atto/lib.php

CONFLICT (content): Merge conflict in lib/editor/atto/lib.php

Auto-merging lib/editor/atto/plugins/backcolor/yui/build/moodle-atto_backcolor-button/moodle-atto_backcolor-button-debug.js

....

Auto-merging lib/phpunit/classes/util.php

CONFLICT (content): Merge conflict in lib/phpunit/classes/util.php

Auto-merging lib/phpunit/lib.php

...

CONFLICT (content): Merge conflict in lib/upgrade.txt

...

CONFLICT (content): Merge conflict in lib/weblib.php

...

CONFLICT (content): Merge conflict in lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-debug.js

Auto-merging lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js

CONFLICT (content): Merge conflict in lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue-min.js

Auto-merging lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js

CONFLICT (content): Merge conflict in lib/yui/build/moodle-core-notification-dialogue/moodle-core-notification-dialogue.js

...

CONFLICT (content): Merge conflict in lib/yui/src/notification/js/dialogue.js

Auto-merging login/index.php

...

CONFLICT (content): Merge conflict in mod/data/lib.php

...

CONFLICT (content): Merge conflict in mod/data/tests/lib_test.php

...

CONFLICT (content): Merge conflict in mod/forum/post.php

....

CONFLICT (content): Merge conflict in theme/bootstrapbase/style/moodle.css

....

CONFLICT (content): Merge conflict in theme/image.php

Auto-merging theme/more/lang/en/theme_more.php

...

Auto-merging version.php

CONFLICT (content): Merge conflict in version.php

...

Auto-merging webservice/xmlrpc/version.php

Automatic merge failed; fix conflicts and then commit the result.


How do I fix the conflicts? I did not change anything as far as I know

doing a git diff did not output anything

Thanks








Average of ratings: -
In reply to Jerry Lau

Re: git pull error

by Ken Task -
Picture of Particularly helpful Moodlers

Is this on your test server?   Did you make a code directory backup before attempting git anything?

Googling for that error begets lots of advice ... many point to:

https://git-scm.com/book/en/v1/Git-Tools-Stashing

Now if you 'get' (pun intended) tired of messing with 'git', unarchive your backup in another location, copy the hidden .git directory and the hidden .gitignore file from the archive into the directory you've been messin' with.    You are then back to square one.

Facing the original again: 'local changes to 'blocks/blog_tags/tests/behat/blogtag.feature'.

Just did a git pull on a 2.8.9 test directory to get it to 2.8.11 and there was no listing in changes to

blocks/blog_tags/test/behat/blogtag.feature.

Soooooooooo ... have we been playing with that? ;)   Just askin' ... am NOT a git expert and while I do tinker with it from time to time have found always starting 'git play time' with a backup of code dir to be a time saver. ;)

'spirit of sharing', Ken