* Lump commit HOWTO?
@ 2007-07-13 1:21 Josh Boyer
2007-07-13 4:54 ` Alex Riesen
2007-07-13 6:09 ` martin f krafft
0 siblings, 2 replies; 4+ messages in thread
From: Josh Boyer @ 2007-07-13 1:21 UTC (permalink / raw)
To: Git Mailing List
Hi All,
I have a specific workflow in mind that I'm not entirely sure how to
accomplish with git. What I'd like to do is track a project in a
local branch, and do commits of my own there as well. Then when I'm
ready to submit the work, I want to take all the incremental commits
and lump them into a single new commit and push that out as a patch or
into a branch for people to pull from.
E.g.
1) clone upstream into foo branch
2) commit A
3) commit B
4) pull upstream changes into foo branch
5) commit C
6) commit D
7) repeat steps 2 - 6 in various orders
8) take all local commits (A - D) and create a single commit without
any of the upstream changes in it
Is something like that easily accomplished? Or perhaps a different
workflow that would allow similar results?
josh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lump commit HOWTO?
2007-07-13 1:21 Lump commit HOWTO? Josh Boyer
@ 2007-07-13 4:54 ` Alex Riesen
2007-07-13 13:43 ` Josh Boyer
2007-07-13 6:09 ` martin f krafft
1 sibling, 1 reply; 4+ messages in thread
From: Alex Riesen @ 2007-07-13 4:54 UTC (permalink / raw)
To: Josh Boyer; +Cc: Git Mailing List
Josh Boyer, Fri, Jul 13, 2007 03:21:17 +0200:
> Hi All,
>
> I have a specific workflow in mind that I'm not entirely sure how to
> accomplish with git. What I'd like to do is track a project in a
> local branch, and do commits of my own there as well. Then when I'm
> ready to submit the work, I want to take all the incremental commits
> and lump them into a single new commit and push that out as a patch or
> into a branch for people to pull from.
See git merge --squash. It is exactly that.
Also git-rebase --interactive and git cherry-pick -n can help you to
get the same.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lump commit HOWTO?
2007-07-13 1:21 Lump commit HOWTO? Josh Boyer
2007-07-13 4:54 ` Alex Riesen
@ 2007-07-13 6:09 ` martin f krafft
1 sibling, 0 replies; 4+ messages in thread
From: martin f krafft @ 2007-07-13 6:09 UTC (permalink / raw)
To: Git Mailing List
[-- Attachment #1: Type: text/plain, Size: 692 bytes --]
also sprach Josh Boyer <jwboyer@gmail.com> [2007.07.13.0321 +0200]:
> 8) take all local commits (A - D) and create a single commit without
> any of the upstream changes in it
This is entirely untested and since I am a newbie, it might well not
work, but shouldn't the following do what you want?
git log origin..master --> gives you the local commits not in origin
git checkout -b merger
git merge --squash <sha> <sha> <sha> ...
git commit ...
--
martin; (greetings from the heart of the sun.)
\____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
spamtraps: madduck.bogus@madduck.net
officer, arrest that man! he's whistling a copyrighted song.
[-- Attachment #2: Digital signature (GPG/PGP) --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Lump commit HOWTO?
2007-07-13 4:54 ` Alex Riesen
@ 2007-07-13 13:43 ` Josh Boyer
0 siblings, 0 replies; 4+ messages in thread
From: Josh Boyer @ 2007-07-13 13:43 UTC (permalink / raw)
To: Alex Riesen; +Cc: Git Mailing List
On 7/12/07, Alex Riesen <raa.lkml@gmail.com> wrote:
> Josh Boyer, Fri, Jul 13, 2007 03:21:17 +0200:
> > Hi All,
> >
> > I have a specific workflow in mind that I'm not entirely sure how to
> > accomplish with git. What I'd like to do is track a project in a
> > local branch, and do commits of my own there as well. Then when I'm
> > ready to submit the work, I want to take all the incremental commits
> > and lump them into a single new commit and push that out as a patch or
> > into a branch for people to pull from.
>
> See git merge --squash. It is exactly that.
Hm, OK. I'll have to play with that.
> Also git-rebase --interactive and git cherry-pick -n can help you to
> get the same.
Gah... I totally missed git rebase. Looks massively useful. Thanks!
josh
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-07-13 13:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 1:21 Lump commit HOWTO? Josh Boyer
2007-07-13 4:54 ` Alex Riesen
2007-07-13 13:43 ` Josh Boyer
2007-07-13 6:09 ` martin f krafft
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).