Git: Make one branch exactly like another

Posted by G. Martin on Stack Overflow See other posts from Stack Overflow or by G. Martin
Published on 2010-04-22T22:49:49Z Indexed on 2010/04/22 22:53 UTC
Read the original article Hit count: 191

Filed under:
|

I am relatively new to Git, and I'm still not very comfortable with it. Right now, I'm looking for the command/options/magic that can make the current branch look like another branch; that is, to merge them, but when a conflict arises, to always choose the difference in the branch that is being merged into the current one.

My situation is thus; I have an stable(ish) application on the "master" branch. I also have another branch, called "feature". I basically want to make changes/additions/deletions to feature until I like the new feature I'm working on. Once I feel it is ready, I want to make the master branch look identical to the feature branch.

I know this probably isn't a best practice, but as I said, I'm new to Git. I plan on learning how to do more complicated things in the future, but for now, this is all I need.

Thanks, SO!

© Stack Overflow or respective owner

Related posts about git

Related posts about merge