> From: Konstantin Khomoutov <flatw...@users.sourceforge.net>
> > Then after fixing the bug in 3 files (for eg index.php, register.php
> > and login.php), i merge it in the master branch
> > 
> > *>git checkout master
> > > **>git merge bugfix*
> > 
> > The above code will merge all the 3 files i made changes, but is
> > there anyway that i can force GIT to merge only 2 files, say
> > login.php and register.php only?
> Yes, pass the "--no-commit" option to `git merge` and it won't
> automatically record a merge commit but will rather leave the changes
> staged in the index.  Then you'll be able to unstage the changes made
> to index.php by running
> $ git reset index.php
> After that, commit as usually.

My understanding is that one could also use this sequence:

> git checkout master
> git merge --no-commit bugfix

and then selectively commit the changes one wanted to commit:

> git commit login.php register.php

Am I correct?

This would be somewhat easier to use if one wanted to then commit the
remaining changes, as they would remain in the index for

> git commit


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to