Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hi Regina,

On Tue, 2011-08-30 at 23:29 +0200, Regina Henschel wrote:
Hi all,

I'm still learning to use git and need some help. I have made a patch 
for issue 34431. But after I used the 'commit' command I noticed, that I 
had to change a file, which needs another 'commit'. Now the command 
'format-patch' has produced two files, one for each commit. Is there a 
way, to get _one_ patch file?

Yes.  You can use git rebase --interactive for that (or git rebase -i
for short).  It allows you to combine several of your local commits into
a single commit.

But be warned that this command is a bit hard to use and can screw with
your commits when used incorrectly.  So I recommend you have some
practice runs to get comfortable with it first.  That said, this is an
indispensable command that I personally use all the time to combine
several of my local commits before pushing.  So it's worth spending some
time to learn this command.

I want to use the same build to work on a different problem (Getting 
non-filled line end markers). How can I do that, so that later on, a 
'format-patch' will generate only the new changes and not those for 
issue 34431 too?

What I recommend is that you create a separate branch for each problem
to solve.  Switching between branches is pretty fast with git, so that's
another technique you can learn with git.  You can easily delete
branches after you are done.  Creation and deletion of branches with git
are very cheap, so I recommend you learn how to make effective use of
git's branches.

HTH,

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc
<kohei.yoshida@suse.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.