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.
Branches are just pointers within the graph of commits. You can
git-reset a branch to point to anywhere you like, just make sure you checkout the intended branch before making any further commits.
Answered By – crazyscot