Hello,
Does Git allow to commit only selected patches from inside 1 file ? I'm coming from a darcs world where this is supported... Probably it is supported in Git too, but I can't figure out how :-/
Thanks for help
-- Erik
threads / discuss / 11119
Subject: committing only selected diff's of a file
Hello,
Does Git allow to commit only selected patches from inside 1 file ? I'm coming from a darcs world where this is supported... Probably it is supported in Git too, but I can't figure out how :-/
Thanks for help
-- Erik
Re: committing only selected diff's of a file
On Mon, Dec 03, 2007 at 11:03:17AM +0100, Erik Colson <eco@ecocode.net> wrote:
> Does Git allow to commit only selected patches from inside 1 file ? > I'm coming from a darcs world where this is supported... > Probably it is supported in Git too, but I can't figure out how :-/
git add -i
(i also wrote a wrapper for people who come from darcs: http://git.frugalware.org/repos/pacman-tools/darcs-git.py but it contains many hacks so i don't want to advertise it too much as others on this list will burn me :) )
- VMiklos
Re: committing only selected diff's of a file
Erik Colson <eco@ecocode.net> writes:
> Does Git allow to commit only selected patches from inside 1 file ? > I'm coming from a darcs world where this is supported... > Probably it is supported in Git too, but I can't figure out how :-/
Use "git add --interactive" or "git gui" (the latter requires Tcl/Tk).
-- Jakub Narebski
Re: committing only selected diff's of a file
Jakub Narebski <jnareb@gmail.com> writes:
> "git gui" (the latter requires Tcl/Tk).
... Right click on a patch hunk, "stage for commit".
-- Matthieu