Git rebase échoue, 'vos modifications locales aux fichiers suivants seraient écrasées par merge'. Pas de changements locaux?

voici ma transcription d'une tentative de fusion de ma branche bugfix sur ma branche master en préparation pour la pousser en amont. Depuis la création de la branche bugfix, il y a eu quelques changements en amont dans master qui refuse maintenant de rebaser.

les fichiers sur lesquels il lance des erreurs ne sont pas diffus lorsqu'ils sont ouverts. aucun fichier n'a été ajouté, supprimé ou renommé. Rien n'est ignoré et rien n'est non tracé ou mis en scène ou non. Je suis complètement perplexe quant à pourquoi le rebase est un échec.

je suis sur OS X 10.6.6 et git 1.7.4

.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase bug586-test master-test
First, rewinding head to replay your work on top of it...
Applying: - comiitting code related to api permissions
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
    inc/data.inc
    templates/apipermissions_tpl.inc
    templates/currencies_tpl.inc
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0001 - comiitting code related to api permissions

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git status
# Not currently on any branch.
nothing to commit (working directory clean)



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase --abort
HEAD is now at 5efccf1 - comiitting code related to api permissions



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git log -n10 --oneline
5efccf1 - comiitting code related to api permissions
a8a5ee4 Style changes for IE
cfca618 Style changes for IE
8a69de6 Style changes for IE
8946585 - comiitting code related to api permissions - fixed an html error in the currencies template
5fba0a9 Merges the 1.11b branch bugfixes and changes into trunk
ef57049 Andrew Commiting on Blakes behalf on changes he made to transfers; Also an Indue GW balance fix; debitcarupload fix for LSN
69e4313 Fixed an issue with Support From email
9058fb6 Sets the svn property svn:eol-style to LF, to enforce unix style line endings
240839e Fixes up a lot of the whitespace issues.



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git checkout bug586-test 
Switched to branch 'bug586-test'



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git log -n10 --oneline  
b7b1f8a Resolves #586, Postback on deposit
5fba0a9 Merges the 1.11b branch bugfixes and changes into trunk
ef57049 Andrew Commiting on Blakes behalf on changes he made to transfers; Also an Indue GW balance fix; debitcarupload fix for LSN
69e4313 Fixed an issue with Support From email
9058fb6 Sets the svn property svn:eol-style to LF, to enforce unix style line endings
240839e Fixes up a lot of the whitespace issues.
cf27b6f - bug that came up with transferring. The transfer page had a hidden field called to, which was taking precedence over cards and usercard which would throw the system out a bit
7c21a81 Fixes #603, new add transaction form, journalled.
01e6292 Removes a pile of resource forks
880c5bc - bug that came up with transferring. The transfer page had a hidden field called to, which was taking precedence over cards and usercard which would throw the system out a bit



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase master-test bug586-test
First, rewinding head to replay your work on top of it...
Applying: Resolves #586, Postback on deposit
Using index info to reconstruct a base tree...
<stdin>:52: trailing whitespace.
                'name' => 'Invoice Transfer Out', 
<stdin>:175: trailing whitespace.

warning: 2 lines add whitespace errors.
Falling back to patching base and 3-way merge...
error: Your local changes to the following files would be overwritten by merge:
    templates/deposit_tpl.inc
Please, commit your changes or stash them before you can merge.
Aborting
Failed to merge in the changes.
Patch failed at 0001 Resolves #586, Postback on deposit

When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".



.-(/Volumes/joshua/www/txfunds)-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------(joshua@Kusanagi)-
`--> git rebase --abort
HEAD is now at b7b1f8a Resolves #586, Postback on deposit
87
demandé sur Kzqai 2011-02-22 07:52:10

2 réponses

c'est la même réponse qu'une autre de mes questions sur les troubles.

je suis sur un mac, et cet obscur changement de configuration a semblé réparer toutes mes difficultés concernant les changements non stabilisés quand il n'y en avait pas.

git config --global core.trustctime false

je pense que c'est à cause des différences entre les temps de fichier windows, linux et mac. qui sait, n'hésitez pas à commenter si vous le faites.

mise à jour: ce billet de blog explique ce qu'il se passe, en quelque sorte.

168
répondu jhogendorn 2015-04-07 07:14:35

en ce qui concerne la réponse de Joshua Hogendorn: il me semble que laisser Xcode ouvert tout en travaillant sur le dépôt avec git conduit à ces problèmes. Cela a même conduit à une situation où git a commis quelque chose que je pensais avoir caché (et encore avoir par la suite) mais Xcode a juste écrit au système de fichiers pendant le rebase.

donc: fermez votre projet Xcode avant de travailler sur le repo avec git si vous voulez être en sécurité, et alors vous n'avez probablement pas besoin de la core.trustctime paramètre false.

33
répondu user132837 2012-02-08 09:20:08