Re: Ignore on commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<ignore on commit>
> I'm not sure to follow everything... But looks like:
>
>    $ git add -p
>
> or
>
>    $ git add -i
>
> should do what you want, no?
>
> You select the hunks to commit, let over the "hacks" and then
>
>    $ git commit

Similar but not quite; the idea is that you know that there is some
code (I'm just talking about files here, so lets ignore hunks for the
moment) which is normally checked in but for a period of time you want
it ignored. So you don't want it git ignored but at the same time you
don't want to see these files in the list of modified files. The
changelist concept allows you to "move" the files out of the way from
the main modified section until you are ready to commit them. Perhaps
an imaginary git status would help:

# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#	modified:   some_staged_file.h
#
# Changes not staged for commit:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#	modified:   some_modified_file.h
#
# Changes ignored on commit:
#
#	modified:   some_other_modified_file.h

Such that if you now did a git add -A, some_modified_file.h would then
be staged but some_other_modified_file.h would stay put. Of course the
name "ignored on commit" makes little sense in git terms, but I'm
using it here as its the svn term. Its a "modified but temporarily
ignored" or something.

Cheers

Marco
-- 
So young, and already so unknown -- Pauli

blog: http://mcraveiro.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]