Reputation: 78234
On my ec2 instance, I am trying to do a pull requests of my github repo. I get the below error. On my local machine I commit everything. How do I deal with pyc files if that is the issue?
git add .
git commit -m 't'
git push origin development
git pull
remote: Counting objects: 3, done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 2 (delta 1), reused 2 (delta 1)
Unpacking objects: 100% (2/2), done.
From https://github.com/me/rtbopsConfig
8e320f6..0565407 development -> origin/development
Updating 94f7f3e..0565407
error: Your local changes to the following files would be overwritten by merge:
classes/ec2/ec2Auto.pyc
classes/redis_ha.pyc
classes/rtbUtilities.pyc
rtb_redis_connections/redis_connections.pyc
Please, commit your changes or stash them before you can merge.
Aborting
Upvotes: 1
Views: 3925
Reputation: 363487
You shouldn't store .pyc
files in Git. On your workstation, do
find . -name *.pyc -exec git rm {} \;
Then add a line *.pyc
to .gitignore
, commit all the changes and push.
On the other end (EC2), do
git checkout classes/ec2/ec2Auto.pyc classes/redis_ha.pyc \
classes/rtbUtilities.pyc rtb_redis_connections/redis_connections.pyc
then pull.
Upvotes: 7