1

私の ec2 インスタンスで、github リポジトリのプル リクエストを実行しようとしています。以下のエラーが表示されます。私のローカル マシンでは、すべてをコミットします。それが問題である場合、どうすればpycファイルを処理できますか?

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
4

1 に答える 1

7

.pycファイルを Git に保存しないでください。ワークステーションで、

find . -name *.pyc -exec git rm {} \;

*.pyc次に、 に行を追加し.gitignore、すべての変更をコミットしてプッシュします。

反対側(EC2)で、

git checkout classes/ec2/ec2Auto.pyc classes/redis_ha.pyc \
             classes/rtbUtilities.pyc rtb_redis_connections/redis_connections.pyc

それから引っ張ります。

于 2012-06-20T12:10:17.067 に答える