{"thread":{"id":"17969","subject":"how to reset to remote repo","startedAt":"2009-02-23T10:55:46Z","lastAt":"2009-02-23T23:19:28Z","messageCount":6,"participants":["bill lam","Dilip M","Sitaram Chamarty"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"105893","messageId":"20090223105546.GA7425@b2j","threadId":"17969","inReplyTo":null,"subject":"how to reset to remote repo","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-02-23T10:55:46Z","receivedAt":"2009-02-23T10:55:46Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"I cloned some public git repos and made some local patches. Later I\npulled updates again and that merged with my patches. Now I want to\nthrow away my patches, how do I get a clean working repo that is a\n100% clone of the remote repo?\n\n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n唐詩285 張祜  集靈臺二首之二\n    虢國夫人承主恩  平明騎馬入宮門  卻嫌脂粉污顏色  淡掃蛾眉朝至尊\n"},{"id":"105895","messageId":"c94f8e120902230414v33d36acelc3dc39861646539a@mail.gmail.com","threadId":"17969","inReplyTo":"20090223105546.GA7425@b2j","subject":"Re: how to reset to remote repo","fromName":"Dilip M","fromEmail":"dilipm79@gmail.com","sentAt":"2009-02-23T12:14:58Z","receivedAt":"2009-02-23T12:14:58Z","isPatch":false,"sender":{"key":"dilipm79@gmail.com","avatar":"https://gravatar.com/avatar/9417e308513ce9251de2802a026c72eb164e6c9b9d7143a3ee13f6ed0c4d1bd5?d=mp&s=160"},"body":"git reset --hard HEAD\n\n-- BR, Dilip\n\n\n\n\nOn Mon, Feb 23, 2009 at 4:25 PM, bill lam <cbill.lam@gmail.com> wrote:\n> I cloned some public git repos and made some local patches. Later I\n> pulled updates again and that merged with my patches. Now I want to\n> throw away my patches, how do I get a clean working repo that is a\n> 100% clone of the remote repo?\n>\n> --\n> regards,\n> ====================================================\n> GPG key 1024D/4434BAB3 2008-08-24\n> gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n> 唐詩285 張祜  集靈臺二首之二\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":"105897","messageId":"slrngq56ql.q4m.sitaramc@sitaramc.homelinux.net","threadId":"17969","inReplyTo":"20090223105546.GA7425@b2j","subject":"Re: how to reset to remote repo","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2009-02-23T12:49:25Z","receivedAt":"2009-02-23T12:49:25Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On 2009-02-23, bill lam <cbill.lam@gmail.com> wrote:\n> I cloned some public git repos and made some local patches. Later I\n> pulled updates again and that merged with my patches. Now I want to\n> throw away my patches, how do I get a clean working repo that is a\n> 100% clone of the remote repo?\n\ngit reset --hard origin/master\n\nThis is a very simple question, and may be quicker on irc\n:-)\n"},{"id":"105900","messageId":"20090223145722.GB7422@b2j","threadId":"17969","inReplyTo":"slrngq56ql.q4m.sitaramc@sitaramc.homelinux.net","subject":"Re: how to reset to remote repo","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-02-23T14:57:22Z","receivedAt":"2009-02-23T14:57:22Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"On Mon, 23 Feb 2009, Sitaram Chamarty wrote:\n> git reset --hard origin/master\n> \n> This is a very simple question, and may be quicker on irc\n> :-)\n\nDoes it always work?  For example if I already made several patches\ninterleaved with several fetch/update, or if I rebase to remove the\norgin/master?\n\n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n唐詩286 張祜  題金陵渡\n    金陵津渡小山樓  一宿行人自可愁  潮落夜江斜月裡  兩三星火是瓜州\n"},{"id":"105908","messageId":"slrngq5her.6l3.sitaramc@sitaramc.homelinux.net","threadId":"17969","inReplyTo":"20090223145722.GB7422@b2j","subject":"Re: how to reset to remote repo","fromName":"Sitaram Chamarty","fromEmail":"sitaramc@gmail.com","sentAt":"2009-02-23T15:50:51Z","receivedAt":"2009-02-23T15:50:51Z","isPatch":false,"sender":{"key":"sitaramc@gmail.com","avatar":"https://avatars.githubusercontent.com/u/43316?v=4"},"body":"On 2009-02-23, bill lam <cbill.lam@gmail.com> wrote:\n> On Mon, 23 Feb 2009, Sitaram Chamarty wrote:\n>> git reset --hard origin/master\n>> \n>> This is a very simple question, and may be quicker on irc\n>> :-)\n>\n> Does it always work?  For example if I already made several patches\n> interleaved with several fetch/update, or if I rebase to remove the\n> orgin/master?\n\nI'm not sure why a rebase of any kind would remove a remote\nbrancg but you can always do 'git fetch' first if you\naccidentally messed up origin/master.\n"},{"id":"105944","messageId":"20090223231928.GA7406@b2j","threadId":"17969","inReplyTo":"slrngq5her.6l3.sitaramc@sitaramc.homelinux.net","subject":"Re: how to reset to remote repo","fromName":"bill lam","fromEmail":"cbill.lam@gmail.com","sentAt":"2009-02-23T23:19:28Z","receivedAt":"2009-02-23T23:19:28Z","isPatch":false,"sender":{"key":"cbill.lam@gmail.com","avatar":null},"body":"On Mon, 23 Feb 2009, Sitaram Chamarty wrote:\n> I'm not sure why a rebase of any kind would remove a remote\n> brancg but you can always do 'git fetch' first if you\n> accidentally messed up origin/master.\n\nThanks. Incidentally I just found that I could git reset just before\nmy first patch and then git pull again.\n\n-- \nregards,\n====================================================\nGPG key 1024D/4434BAB3 2008-08-24\ngpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3\n唐詩226 王維  送別\n    山中相送罷  日暮掩柴扉  春草明年綠  王孫歸不歸\n"}]}