threads / discuss / 11119

committing only selected diff's of a file

Subject: committing only selected diff's of a file

## tl;dr

4 messages between Dec 3, 2007 and Dec 3, 2007.

replies: 3people: 4as markdown or json

Erik Colson· Dec 3, 2007, 10:03 UTC · lore
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
Miklos Vajna· Dec 3, 2007, 11:07 UTC · re: Erik Colson · lore

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
Jakub Narebski· Dec 3, 2007, 11:09 UTC · re: Erik Colson · lore

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

← back to recent threads