On Thu, Jun 20, 2013 at 7:52 PM, Dale R. Worley <wor...@alum.mit.edu> wrote:
> > 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 a topic in the
> Google Groups "Git for human beings" group.
> To unsubscribe from this topic, visit
> To unsubscribe from this group and all its topics, send an email to
> For more options, visit https://groups.google.com/groups/opt_out.
Ok so please confirm if the following steps are okay (assuming that
currently I am in *bugfix* branch)
>git commit -m "major bug fixing" register.php login.php index.php
>git checkout master
>git merge --no-commit bugfix
>git reset index.php
>git push origin master
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
For more options, visit https://groups.google.com/groups/opt_out.