{"thread":{"id":"22407","subject":"Re: 3 question about how to use Git .","startedAt":"2010-01-27T08:35:53Z","lastAt":"2010-01-27T09:52:54Z","messageCount":3,"participants":["honglei junan","Crane Cai","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132753","messageId":"e78dc7d71001270035p4e235f18o59029b93bea25d4e@mail.gmail.com","threadId":"22407","inReplyTo":"e78dc7d71001270034k48e1a386p64e01eb8d6d1187a@mail.gmail.com","subject":"Re: 3 question about how to use Git .","fromName":"honglei junan","fromEmail":"jhonglei@gmail.com","sentAt":"2010-01-27T08:35:53Z","receivedAt":"2010-01-27T08:35:53Z","isPatch":false,"sender":{"key":"jhonglei@gmail.com","avatar":null},"body":"hi,i have three questions seem not not appear in GitFaq,yet confuse me much :\n*) since I've already commit many patches before telling git my name\nand email,should i roll back and recommit all patches to make my name\nin repository?\n*) i create a new branch ms_port,and then commit several patches like,\n    commit 1->commit 2->commit 3->commit 4\nnow i just want to change commit2,without change any others,how could\ni do it?since i only change the local repository,i think this should\nbe allowed.\n*) when cloning a git repository,the network is broken down.How could\ni went on the clone process when the network being OK ?\nsince the download speed is very low, i really don't want to remove\nall things and download them again.\nMany thanks.\n"},{"id":"132760","messageId":"20100127093225.GB3708@crane-desktop","threadId":"22407","inReplyTo":"e78dc7d71001270035p4e235f18o59029b93bea25d4e@mail.gmail.com","subject":"Re: 3 question about how to use Git .","fromName":"Crane Cai","fromEmail":"crane.cai@amd.com","sentAt":"2010-01-27T09:32:25Z","receivedAt":"2010-01-27T09:32:25Z","isPatch":false,"sender":{"key":"crane.cai@amd.com","avatar":null},"body":"On Wed, Jan 27, 2010 at 04:35:53PM +0800, honglei junan wrote:\n> hi,i have three questions seem not not appear in GitFaq,yet confuse me much :\n> *) since I've already commit many patches before telling git my name\n> and email,should i roll back and recommit all patches to make my name\n> in repository?\nOne way I do:\n#checkout your commits\ngit format-patch since-your-commit\n#reset head to begin\ngit reset --hard since-your-commit\n#change your commits in patches, then am\ngit am your-patches\n> *) when cloning a git repository,the network is broken down.How could\n> i went on the clone process when the network being OK ?\n> since the download speed is very low, i really don't want to remove\n> all things and download them again.\nyou need not to remove, just redo clone.\n\n-- \nBest Regards,\n- Crane\n"},{"id":"132761","messageId":"20100127095253.GC6262@coredump.intra.peff.net","threadId":"22407","inReplyTo":"e78dc7d71001270035p4e235f18o59029b93bea25d4e@mail.gmail.com","subject":"Re: 3 question about how to use Git .","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2010-01-27T09:52:54Z","receivedAt":"2010-01-27T09:52:54Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Jan 27, 2010 at 04:35:53PM +0800, honglei junan wrote:\n\n> hi,i have three questions seem not not appear in GitFaq,yet confuse me much :\n> *) since I've already commit many patches before telling git my name\n> and email,should i roll back and recommit all patches to make my name\n> in repository?\n\nYou can use filter-branch to do it automatically. Something like:\n\n  export BAD_EMAIL='The Wrong Email in Your Commits'\n  export GOOD_NAME='Your Correct Name'\n  export GOOD_EMAIL='Your Correct Email'\n  git filter-branch --env-filter '\n    if test \"$GIT_COMMITTER_EMAIL\" = \"$BAD_EMAIL\"; then\n      GIT_COMMITTER_NAME=$GOOD_NAME\n      GIT_COMMITTER_EMAIL=$GOOD_EMAIL\n    fi\n    if test \"$GIT_AUTHOR_EMAIL\" = \"$BAD_EMAIL\"; then\n      GIT_AUTHOR_NAME=$GOOD_NAME\n      GIT_AUTHOR_EMAIL=$GOOD_EMAIL\n    fi\n  '\n\nwhich will rewrite just the commits with the problem.  Note that this\nwill rewrite the history of those commits. If you've shared the old ones\nwith others, they will see them as entirely new commits instead of\nreplacements.\n\n> *) i create a new branch ms_port,and then commit several patches like,\n>     commit 1->commit 2->commit 3->commit 4\n> now i just want to change commit2,without change any others,how could\n> i do it?since i only change the local repository,i think this should\n> be allowed.\n\nTry \"git rebase -i commit1\".\n\n> *) when cloning a git repository,the network is broken down.How could\n> i went on the clone process when the network being OK ?\n> since the download speed is very low, i really don't want to remove\n> all things and download them again.\n\nGit doesn't currently support restartable clone. It's something that\nwould be nice to have, but there are some technical issues that make it\nmore difficult than simply starting where we left off (namely that the\npack that is being downloaded via the git protocol is generated on the\nfly). You can find some previous discussions by searching the list for\n\"restartable clone\".\n\n-Peff\n"}]}