From: Joshua Jensen <jjensen@workspacewhiz.com>
To: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Automatically exclude hunks from the commit
Date: Mon, 19 Jul 2010 21:02:32 -0600 [thread overview]
Message-ID: <4C4511C8.8090405@workspacewhiz.com> (raw)
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.
Thanks for the help.
Josh
next reply other threads:[~2010-07-20 3:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 3:02 Joshua Jensen [this message]
2010-07-20 5:17 ` Automatically exclude hunks from the commit Joshua Juran
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=4C4511C8.8090405@workspacewhiz.com \
--to=jjensen@workspacewhiz.com \
--cc=git@vger.kernel.org \
/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).