* Re: 3 question about how to use Git .
[not found] <e78dc7d71001270034k48e1a386p64e01eb8d6d1187a@mail.gmail.com>
@ 2010-01-27 8:35 ` honglei junan
2010-01-27 9:32 ` Crane Cai
2010-01-27 9:52 ` Jeff King
0 siblings, 2 replies; 3+ messages in thread
From: honglei junan @ 2010-01-27 8:35 UTC (permalink / raw)
To: git
hi,i have three questions seem not not appear in GitFaq,yet confuse me much :
*) since I've already commit many patches before telling git my name
and email,should i roll back and recommit all patches to make my name
in repository?
*) i create a new branch ms_port,and then commit several patches like,
commit 1->commit 2->commit 3->commit 4
now i just want to change commit2,without change any others,how could
i do it?since i only change the local repository,i think this should
be allowed.
*) when cloning a git repository,the network is broken down.How could
i went on the clone process when the network being OK ?
since the download speed is very low, i really don't want to remove
all things and download them again.
Many thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 3 question about how to use Git .
2010-01-27 8:35 ` 3 question about how to use Git honglei junan
@ 2010-01-27 9:32 ` Crane Cai
2010-01-27 9:52 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Crane Cai @ 2010-01-27 9:32 UTC (permalink / raw)
To: honglei junan; +Cc: git
On Wed, Jan 27, 2010 at 04:35:53PM +0800, honglei junan wrote:
> hi,i have three questions seem not not appear in GitFaq,yet confuse me much :
> *) since I've already commit many patches before telling git my name
> and email,should i roll back and recommit all patches to make my name
> in repository?
One way I do:
#checkout your commits
git format-patch since-your-commit
#reset head to begin
git reset --hard since-your-commit
#change your commits in patches, then am
git am your-patches
> *) when cloning a git repository,the network is broken down.How could
> i went on the clone process when the network being OK ?
> since the download speed is very low, i really don't want to remove
> all things and download them again.
you need not to remove, just redo clone.
--
Best Regards,
- Crane
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 3 question about how to use Git .
2010-01-27 8:35 ` 3 question about how to use Git honglei junan
2010-01-27 9:32 ` Crane Cai
@ 2010-01-27 9:52 ` Jeff King
1 sibling, 0 replies; 3+ messages in thread
From: Jeff King @ 2010-01-27 9:52 UTC (permalink / raw)
To: honglei junan; +Cc: git
On Wed, Jan 27, 2010 at 04:35:53PM +0800, honglei junan wrote:
> hi,i have three questions seem not not appear in GitFaq,yet confuse me much :
> *) since I've already commit many patches before telling git my name
> and email,should i roll back and recommit all patches to make my name
> in repository?
You can use filter-branch to do it automatically. Something like:
export BAD_EMAIL='The Wrong Email in Your Commits'
export GOOD_NAME='Your Correct Name'
export GOOD_EMAIL='Your Correct Email'
git filter-branch --env-filter '
if test "$GIT_COMMITTER_EMAIL" = "$BAD_EMAIL"; then
GIT_COMMITTER_NAME=$GOOD_NAME
GIT_COMMITTER_EMAIL=$GOOD_EMAIL
fi
if test "$GIT_AUTHOR_EMAIL" = "$BAD_EMAIL"; then
GIT_AUTHOR_NAME=$GOOD_NAME
GIT_AUTHOR_EMAIL=$GOOD_EMAIL
fi
'
which will rewrite just the commits with the problem. Note that this
will rewrite the history of those commits. If you've shared the old ones
with others, they will see them as entirely new commits instead of
replacements.
> *) i create a new branch ms_port,and then commit several patches like,
> commit 1->commit 2->commit 3->commit 4
> now i just want to change commit2,without change any others,how could
> i do it?since i only change the local repository,i think this should
> be allowed.
Try "git rebase -i commit1".
> *) when cloning a git repository,the network is broken down.How could
> i went on the clone process when the network being OK ?
> since the download speed is very low, i really don't want to remove
> all things and download them again.
Git doesn't currently support restartable clone. It's something that
would be nice to have, but there are some technical issues that make it
more difficult than simply starting where we left off (namely that the
pack that is being downloaded via the git protocol is generated on the
fly). You can find some previous discussions by searching the list for
"restartable clone".
-Peff
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-27 9:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <e78dc7d71001270034k48e1a386p64e01eb8d6d1187a@mail.gmail.com>
2010-01-27 8:35 ` 3 question about how to use Git honglei junan
2010-01-27 9:32 ` Crane Cai
2010-01-27 9:52 ` Jeff King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).