git issues


#1

heya!

when recently trying to pull from develop i got the following error:

  
  
Receiving objects: 100% (2497/2497), 114.72 MiB | 1.02 MiB/s, done.  
Resolving deltas: 100% (1561/1561), completed with 418 local objects.  
From [https://github.com/openframeworks/openFrameworks](https://github.com/openframeworks/openFrameworks)  
 * branch            develop    -> FETCH_HEAD  
Updating f70898a..4640e4d  
error: Your local changes to the following files would be overwritten by merge:  
        .gitignore  
        addons/ofxAndroid/ofAndroidLib/.classpath  
        addons/ofxAndroid/ofAndroidLib/src/cc/openframeworks/OFAndroidSoundPlaye  
r.java  
        addons/ofxAndroid/src/ofAppAndroidWindow.cpp  
        addons/ofxAndroid/src/ofxAndroidAccelerometer.cpp  
        addons/ofxAndroid/src/ofxAndroidSoundPlayer.cpp  
        addons/ofxAndroid/src/ofxAndroidSoundPlayer.h  
        addons/ofxAndroid/src/ofxAndroidVideoGrabber.cpp  
        addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.cpp  
        addons/ofxAssimpModelLoader/src/ofxAssimpModelLoader.h  
        addons/ofxGui/src/ofxButton.h  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a/libopencv_calib3d.a  
  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a/libopencv_contrib.a  
  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a/libopencv_core.a  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a/libopencv_features2  
d.a  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a/libopencv_flann.a  
        addons/ofxOpenCv/libs/opencv/lib/android/a  
error: The following untracked working tree files would be overwritten by merge:  
  
        addons/ofxAndroid/ofAndroidLib/build.xml  
        addons/ofxAndroid/ofAndroidLib/local.properties  
        addons/ofxAndroid/ofAndroidLib/proguard.cfg  
        addons/ofxAndroid/ofAndroidLib/project.properties  
        addons/ofxAssimpModelLoader/libs/assimp/lib/ios/assimp.a  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi-v7a/libopencv_androidca  
mera.a  
        addons/ofxOpenCv/libs/opencv/lib/android/armeabi/libopencv_androidcamera  
.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_calib3d.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_contrib.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_core.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_features2d.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_flann.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_gpu.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_highgui.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_imgproc.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_legacy.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_ml.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_objdetect.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/opencv_video.a  
        addons/ofxOpenCv/libs/opencv/lib/ios/zlib.a  
Please move or remove them before you can merge.  
Aborting  
  

i get this kind of error every so often in git workflows on big/active repos (it insists i’ve changed files that i haven’t)
it seems to be a bug to me and is painful to work around because there is no ‘force pull’ (only the wet workarounds using git reset which don’t often work)
so you actually have to go in and edit each file manually

note:
# i defintely didn’t touch any of the files in this list at all, not one bit, even a smidge
# i’m on windows msysgit

any ideas? :frowning:


#2

Could be a line-endings thing (http://help.github.com/line-endings/) or something related to mode changes (http://stackoverflow.com/questions/1580596/how-do-i-make-git-ignore-mode-changes-chmod).

I have a similarly strange issue: I have OF in my dropbox, and share this between a 32bit and a 64bit Ubuntu box. I regularly get/got the issue that git complains about changes to some library and other files, when switching computers. There’s no way I know that I can get git to display the actual changes, though - I suspect it is some weird permissions/mode thing related to the fact that on one computer, OF resides on an NTFS drive.
My solution when I get this bug is to just git reset --hard, then pull. Often, it’s enough to git stash, the git stash pop, and the changes disappear, so try that and see if it solves the issue for you.


#3

btw, moved to correct forum - revision control.


#4

hey!

neither git rest --hard or git stash solved the problem at the time.
as i get more familiar with git i hope to figure this out

line endings is a possible for the source code files as it’s automatically handling this in windows
but still doesn’t explain the ios bins. hmm…

i should diff next time to see what it thinks has changed