I know this probably should never happen:( but the reality is I have a master
branch has some initial features of a smoke test, which is currently live on a site to for real clients to testing. Then the team plans to adds more features to the smoke test. I have been actively working on the new feature branch, let's call it feature-branch
.
The feature-branch
requires auth and more complex logic than master. I couldn't sync feature-branch
with master
while developing on it as updates on master
will auto-deployed to live testing and we don't want to do that until the security is perfect.
Now the feature-branch
is pretty much ready, however, the extra features caused dramatically changes on the code. I plan to merge this feature-branch
to master
to deliver the features added.
I expect there will be huge amount of conflicts, some of which would be hard to resolve. Luckily the major conflicts are only in a couple of files.
Is there a way to "overwrite" the master
branch with this feature-branch
while we keep the previous commit records of master
branch?
I suggest that you pull the master branch to your feature-branch, resolve possible conflicts. At this point you can make a pull request or simply push your feature branch to the master. All,your previous commit on the master branch will still be present. VCS are meant for that
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.