From: Joshua Juran <jjuran@gmail.com>
To: Joshua Jensen <jjensen@workspacewhiz.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Automatically exclude hunks from the commit
Date: Mon, 19 Jul 2010 22:17:58 -0700 [thread overview]
Message-ID: <C18AA39F-1ADD-46A8-8A10-25A6B6AF26CB@gmail.com> (raw)
In-Reply-To: <4C4511C8.8090405@workspacewhiz.com>
On Jul 19, 2010, at 8:02 PM, Joshua Jensen wrote:
> I have some files I update frequently where I have some normally
> commented out debug code purposely uncommented during development.
> Git's hunk-level staging saves the day. I can stage everything but
> the debug code without issue.
>
> This got me to thinking. Is there a better way? Is there a
> facility in Git where I could mark a hunk as 'permanently frozen
> unstaged'? Anything marked as such would never be staged for
> commit. I could rest assured I would never accidentally commit my
> debug code, be it extra printfs or a development server or a
> password or so on.
How about keeping your debug changes in a separate branch? I work on
a branch called 'hack', to which I'll commit pretty much anything.
When a patch is ready, I cherry-pick it from master and rebase hack
onto master.[1]
Passwords which are so sensitive that they can't ever be checked in
should be stored in ignored files or outside the repo entirely.
Josh
[1] It's actually more complicated than that. I create 'tip' as a
merger of master and my formal topic branches, and hack stays rebased
on tip.
next prev parent reply other threads:[~2010-07-20 5:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 3:02 Automatically exclude hunks from the commit Joshua Jensen
2010-07-20 5:17 ` Joshua Juran [this message]
2010-07-20 5:36 ` Wincent Colaiuta
2010-07-20 9:26 ` Michael J Gruber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C18AA39F-1ADD-46A8-8A10-25A6B6AF26CB@gmail.com \
--to=jjuran@gmail.com \
--cc=git@vger.kernel.org \
--cc=jjensen@workspacewhiz.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).