{"thread":{"id":"28559","subject":"Unable to remove a file","startedAt":"2011-10-03T14:21:58Z","lastAt":"2011-10-04T14:50:43Z","messageCount":8,"participants":["robert mena","Andreas Schwab","Zbigniew Jędrzejewski-Szmek","John Szakmeister"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"176745","messageId":"CAAZ43xa2upWQ2LWJRVcOPew3kF0W7gSz9UgQ=g0gnMHKQB3Y4A@mail.gmail.com","threadId":"28559","inReplyTo":null,"subject":"Unable to remove a file","fromName":"robert mena","fromEmail":"robert.mena@gmail.com","sentAt":"2011-10-03T14:21:58Z","receivedAt":"2011-10-03T14:21:58Z","isPatch":false,"sender":{"key":"robert.mena@gmail.com","avatar":null},"body":"Hi,\n\nI had a file called \\ under a directory scripts.  I've removed,\ncommitted, pushed to the server BUT my windows clients when they try\nto clone I stop because of this.\n\nDon't ask me why and it is probably windows/the IDE fault but I have\nto solve it.\n\nI found the command filter but it is not working.\n\ngit filter-branch --index-filter 'git rm --cached scripts/\\\\' HEAD\nRewrite b75a1a3af45a4d82fcfe7a6148fc4d6e1c55ee91 (1/48)rm 'scripts/\\'\nRewrite 8a32d6194e9c46dc0f1ce60a2245fcbcd7c12d00 (2/48)rm 'scripts/\\'\nRewrite 892bba8bd7563186d7b1c493cf05d8823cfe2f7b (3/48)rm 'scripts/\\'\nRewrite 0be74d8143f670b08806510dd09cf77029f57bcb (4/48)rm 'scripts/\\'\nRewrite ec7e45a5d8100b7a1e49ca8d0cf5ec5d638f2dd7 (5/48)rm 'scripts/\\'\nRewrite c9dde5bf86391a66f80dc86bcc3078c78866b5da (6/48)rm 'scripts/\\'\nRewrite 499be785b2538a1d6b382e1a0d6e9bdc8a771a76 (7/48)rm 'scripts/\\'\nRewrite 327ac340d4dee02bc2bfed07bd94df5f87b8036c (8/48)rm 'scripts/\\'\nRewrite 5ae256edce2959585b2819c4d6d0d4704b02984a (9/48)rm 'scripts/\\'\nRewrite 3811ef08c5a2be9f4f049c50caf501944483ec72 (10/48)rm 'scripts/\\'\nRewrite 52b3de12d3cde4f6bb920d335fe8629d368d965b (11/48)rm 'scripts/\\'\nRewrite ff115cd8f3213d8218d369361d5ee77010081c22 (12/48)rm 'scripts/\\'\nRewrite d28c02b462e8ee70c6d516d7d2c6754b82bfc80e (13/48)rm 'scripts/\\'\nRewrite 173aecfa81f64644747934f815befb8f83daf6ce (14/48)rm 'scripts/\\'\nRewrite d4649a98584c25c1c8d52adbd49d822c961dc7cb (15/48)rm 'scripts/\\'\nRewrite d026354566abc0d135cdd3838fa96055baa29a03 (16/48)rm 'scripts/\\'\nRewrite 9f7869cf30bc0c04e072859bfbc1325758a5e893 (17/48)rm 'scripts/\\'\nRewrite 6058b6d0b783cd290ce78e344f442d161989b72d (18/48)rm 'scripts/\\'\nRewrite 7f7842d461a645223e39d5b6c451ec8b3e8f89a4 (19/48)rm 'scripts/\\'\nRewrite 11f9ad3c22746e4fddb407790eb0db4db709902d (20/48)fatal:\npathspec 'scripts/\\' did not match any files\nindex filter failed: git rm --cached scripts/\\\n\nHow can I really delete this without having to start from scratch?  I\nwon't hold my breath for windows or even the IDE's to detect this and\nsolve it.\n"},{"id":"176748","messageId":"m262k6jc2c.fsf@igel.home","threadId":"28559","inReplyTo":"CAAZ43xa2upWQ2LWJRVcOPew3kF0W7gSz9UgQ=g0gnMHKQB3Y4A@mail.gmail.com","subject":"Re: Unable to remove a file","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-10-03T16:04:59Z","receivedAt":"2011-10-03T16:04:59Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"robert mena <robert.mena@gmail.com> writes:\n\n> I found the command filter but it is not working.\n>\n> git filter-branch --index-filter 'git rm --cached scripts/\\\\' HEAD\n\n$ git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached scripts/\\\\' HEAD\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"176790","messageId":"CAAZ43xa43YjO7Vqw87cYnXhJWvsZT_ocPpLuJ81jCPc8KKRczw@mail.gmail.com","threadId":"28559","inReplyTo":"m262k6jc2c.fsf@igel.home","subject":"Re: Unable to remove a file","fromName":"robert mena","fromEmail":"robert.mena@gmail.com","sentAt":"2011-10-03T20:57:17Z","receivedAt":"2011-10-03T20:57:17Z","isPatch":false,"sender":{"key":"robert.mena@gmail.com","avatar":null},"body":"Thanks.\n\nIt accepted the command but rejected my push.\n\ngit filter-branch --index-filter 'git rm -q --ignore-unmatch --cached\nscripts/\\\\' HEAD\nRewrite 5ac83187fa298add60cf81fd1d54b194da7ae783 (57/57)\nRef 'refs/heads/master' was rewritten\ngit push\n ! [rejected]        master -> master (non-fast-forward)\nerror: failed to push some refs to 'git@myserver:repository'\n\nShould I do anything special?\n\nOn Mon, Oct 3, 2011 at 12:04 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:\n> robert mena <robert.mena@gmail.com> writes:\n>\n>> I found the command filter but it is not working.\n>>\n>> git filter-branch --index-filter 'git rm --cached scripts/\\\\' HEAD\n>\n> $ git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached scripts/\\\\' HEAD\n>\n> Andreas.\n>\n> --\n> Andreas Schwab, schwab@linux-m68k.org\n> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n> \"And now for something completely different.\"\n>\n"},{"id":"176819","messageId":"4E8ABC85.7090705@in.waw.pl","threadId":"28559","inReplyTo":"CAAZ43xa43YjO7Vqw87cYnXhJWvsZT_ocPpLuJ81jCPc8KKRczw@mail.gmail.com","subject":"Re: Unable to remove a file","fromName":"Zbigniew Jędrzejewski-Szmek","fromEmail":"zbyszek@in.waw.pl","sentAt":"2011-10-04T07:57:57Z","receivedAt":"2011-10-04T07:57:57Z","isPatch":false,"sender":{"key":"zbyszek@in.waw.pl","avatar":"https://avatars.githubusercontent.com/u/349618?v=4"},"body":"On 10/03/2011 10:57 PM, robert mena wrote:\n> Thanks.\n>\n> It accepted the command but rejected my push.\n>\n> git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached\n> scripts/\\\\' HEAD\n> Rewrite 5ac83187fa298add60cf81fd1d54b194da7ae783 (57/57)\n> Ref 'refs/heads/master' was rewritten\n> git push\n>   ! [rejected]        master ->  master (non-fast-forward)\n> error: failed to push some refs to 'git@myserver:repository'\n>\n> Should I do anything special?\ngit push -f\n\nZbyszek\n\n>\n> On Mon, Oct 3, 2011 at 12:04 PM, Andreas Schwab<schwab@linux-m68k.org>  wrote:\n>> robert mena<robert.mena@gmail.com>  writes:\n>>\n>>> I found the command filter but it is not working.\n>>>\n>>> git filter-branch --index-filter 'git rm --cached scripts/\\\\' HEAD\n>>\n>> $ git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached scripts/\\\\' HEAD\n>>\n>> Andreas.\n>>\n>> --\n>> Andreas Schwab, schwab@linux-m68k.org\n>> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n>> \"And now for something completely different.\"\n>>\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n"},{"id":"176830","messageId":"CAEBDL5U4gU9C0De42Sgqv1ODLwQBuOdYdhfTBCMUziCZrhK9dA@mail.gmail.com","threadId":"28559","inReplyTo":"4E8ABC85.7090705@in.waw.pl","subject":"Re: Unable to remove a file","fromName":"John Szakmeister","fromEmail":"john@szakmeister.net","sentAt":"2011-10-04T10:24:38Z","receivedAt":"2011-10-04T10:24:38Z","isPatch":false,"sender":{"key":"john@szakmeister.net","avatar":"https://avatars.githubusercontent.com/u/448087?v=4"},"body":"2011/10/4 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>:\n[snip]\n>> git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached\n>> scripts/\\\\' HEAD\n>> Rewrite 5ac83187fa298add60cf81fd1d54b194da7ae783 (57/57)\n>> Ref 'refs/heads/master' was rewritten\n>> git push\n>>  ! [rejected]        master ->  master (non-fast-forward)\n>> error: failed to push some refs to 'git@myserver:repository'\n>>\n>> Should I do anything special?\n>\n> git push -f\n\nI assume you understand that you're rewriting history Robert, and that\nhas some consequences?  You're master branch is now divergent, since\nthe commit ids changed.\n\n-John\n"},{"id":"176840","messageId":"CAAZ43xZo8cyE_ASz1Hc4yYoUjmH1OnVogOj6mtqFzmAUSBptFw@mail.gmail.com","threadId":"28559","inReplyTo":"CAEBDL5U4gU9C0De42Sgqv1ODLwQBuOdYdhfTBCMUziCZrhK9dA@mail.gmail.com","subject":"Re: Unable to remove a file","fromName":"robert mena","fromEmail":"robert.mena@gmail.com","sentAt":"2011-10-04T11:36:05Z","receivedAt":"2011-10-04T11:36:05Z","isPatch":false,"sender":{"key":"robert.mena@gmail.com","avatar":null},"body":"Hi John,\n\nI understand that.   For the other that have cloned the repository in\nthe past (no one has committed anything locally) is there any special\nprocedure to be performed or a simply git fetch/pull will make their\nlocal repositories in sync?\n\n2011/10/4 John Szakmeister <john@szakmeister.net>:\n> 2011/10/4 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>:\n> [snip]\n>>> git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached\n>>> scripts/\\\\' HEAD\n>>> Rewrite 5ac83187fa298add60cf81fd1d54b194da7ae783 (57/57)\n>>> Ref 'refs/heads/master' was rewritten\n>>> git push\n>>>  ! [rejected]        master ->  master (non-fast-forward)\n>>> error: failed to push some refs to 'git@myserver:repository'\n>>>\n>>> Should I do anything special?\n>>\n>> git push -f\n>\n> I assume you understand that you're rewriting history Robert, and that\n> has some consequences?  You're master branch is now divergent, since\n> the commit ids changed.\n>\n> -John\n>\n"},{"id":"176848","messageId":"4E8B135D.8090507@in.waw.pl","threadId":"28559","inReplyTo":"CAAZ43xZo8cyE_ASz1Hc4yYoUjmH1OnVogOj6mtqFzmAUSBptFw@mail.gmail.com","subject":"Re: Unable to remove a file","fromName":"Zbigniew Jędrzejewski-Szmek","fromEmail":"zbyszek@in.waw.pl","sentAt":"2011-10-04T14:08:29Z","receivedAt":"2011-10-04T14:08:29Z","isPatch":false,"sender":{"key":"zbyszek@in.waw.pl","avatar":"https://avatars.githubusercontent.com/u/349618?v=4"},"body":"On 10/04/2011 01:36 PM, robert mena wrote:\n> Hi John,\n>\n> I understand that.   For the other that have cloned the repository in\n> the past (no one has committed anything locally) is there any special\n> procedure to be performed or a simply git fetch/pull will make their\n> local repositories in sync?\n\ngit fetch updates the remote references, always. If the remote is rebased,\nas in this case, the only difference is that git fetch's message will be\na little bit different.\n\ngit pull cannot be used in this case! It would \"merge\" the old history\nwith the new rewritten history... One should do 'git fetch' and then\n'git reset --hard origin/master' or something like that.\n\n-\nZbyszek\n\n\n> 2011/10/4 John Szakmeister<john@szakmeister.net>:\n>> 2011/10/4 Zbigniew Jędrzejewski-Szmek<zbyszek@in.waw.pl>:\n>> [snip]\n>>>> git filter-branch --index-filter 'git rm -q --ignore-unmatch --cached\n>>>> scripts/\\\\' HEAD\n>>>> Rewrite 5ac83187fa298add60cf81fd1d54b194da7ae783 (57/57)\n>>>> Ref 'refs/heads/master' was rewritten\n>>>> git push\n>>>>   ! [rejected]        master ->    master (non-fast-forward)\n>>>> error: failed to push some refs to 'git@myserver:repository'\n>>>>\n>>>> Should I do anything special?\n>>>\n>>> git push -f\n>>\n>> I assume you understand that you're rewriting history Robert, and that\n>> has some consequences?  You're master branch is now divergent, since\n>> the commit ids changed.\n>>\n>> -John\n>>\n>\n"},{"id":"176849","messageId":"m3k48ku7y4.fsf@hase.home","threadId":"28559","inReplyTo":"4E8B135D.8090507@in.waw.pl","subject":"Re: Unable to remove a file","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2011-10-04T14:50:43Z","receivedAt":"2011-10-04T14:50:43Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> writes:\n\n> git fetch updates the remote references, always.\n\nOnly if the refspec starts with '+'.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"}]}