But u cannot switch branch without commiting first right? and in order or
merge a branch u need to checkout to the master branch. no?

Or am I missing something? Can u specify the steps pls?


On Thu, Jun 20, 2013 at 5:29 PM, Konstantin Khomoutov <
flatw...@users.sourceforge.net> wrote:

> On Wed, 19 Jun 2013 22:24:24 -0700 (PDT)
> Saurav <cance...@gmail.com> wrote:
> > Suppose I have a project on MASTER branch with 100s of php files. To
> > do a bug fixing in the project, i create a separate branch
> >
> > *>git checkout -b bugfix*
> >
> > 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.

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