Never mind... I got it.  I wasn't commiting the changes to the branch 
before going back to master...

http://stackoverflow.com/questions/8111991/git-is-automatically-merging-changes-from-a-different-branch-to-master

Google comes to the rescue again... 

thanks

Doug 

On Monday, June 20, 2016 at 5:20:54 PM UTC-5, dkoleary wrote:
>
> Hey;
>
> Apologies if this is a noob question; but, I'm not that familiar with 
> branching.
>
> I'm writing a script to manipulate a bunch of files under a git repo. 
>  While working out the script, I figured it'd be best to branch out of the 
> master.
>
> $ git status
> # On branch master
> nothing to commit (working directory clean)
> $ git branch
> * master
> $ git checkout -b kill_bill
> Switched to a new branch 'kill_bill'
> $ git branch
> * kill_bill
>   master
>
>
> The script moves one file, then updates a couple of parameters in another. 
>  So far, everything looks fine.  
>
> $ git branch
> * kill_bill
>   master
> $ git status
> # On branch kill_bill
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> #       renamed:    vhost-old_host.conf -> vhost-default.conf
> #
> # Changes not staged for commit:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working 
> directory)
> #
> #       modified:   httpd.conf
>
>
>
> Test complete, I want to blow away the branch, recreate it and start 
> again:  However, when I hop back into the master branch, all my changes are 
> there as if I'd run 'git merge'
>
>
> $ git branch
> * kill_bill
>   master
> $ git checkout master
> M       CL1/PROD/cl1vproesap281/httpd/httpd.conf
> D       CL1/PROD/cl1vproesap281/httpd/vhost-cl1vproesap281.conf
> A       CL1/PROD/cl1vproesap281/httpd/vhost-default.conf
> Switched to branch 'master'
> $ git status
> # On branch master
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> #       renamed:    vhost-cl1vproesap281.conf -> vhost-default.conf
> #
> # Changes not staged for commit:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working 
> directory)
> #
> #       modified:   httpd.conf
> #
>
>
> My (admittedly) limited understanding of branching is that I should be 
> able to do anything in kill_bill without having it affect master?  Am I 
> doing something wrong?
>
> Any help gratefully appreciated.
>
> Doug O'Leary
>
>
>

-- 
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/d/optout.

Reply via email to