![]() ![]() Hence, if you are on branch foo whose upstream is origin/foo and you have the graph you have drawn as the starting position, then: git merge -s ours origin/foo Nonetheless, the -s ours strategy really does precisely what you're asking for: it pretends to merge, without even looking at the other branch. (It arose because the -X values are arguments that are passed on to the driver selected by the -s argument-but this explanation just makes it even worse: "The -s argument is the strategy and the -X arguments are the arguments to the strategy from the first argument." "What, so they're argument arguments!?. I think calling these both ours, and then furthermore calling one a "strategy" and the other a "strategy argument" was at best poor planning, as it's confusing, to say the least. It's the -X ours "strategy argument" that does not work (for the reason you give). To achieve this: A-B-C-O1-O2-O3 (foo origin/foo) git should create remote branch automatically if it's tracked (check git branch -vv). How can I do this? SOLUTION (by Mohan Kumar P)ĭelete remote branch and push. And -s ours strategy doesn't help because this only works for conflicts and non-conflicting changes will still be added to M1. discard all changes introduced in origin/foo. If above is impossible then following is ok for me: A-B-C-O1-O2-O3-M1 (foo)īut I want git diff M1.03 be empty i.e. I want to achieve this if possible: A-B-C-O1-O2-O3 (foo origin/foo) git push origin foo:foo -force is rejected (origin.I want to discard changes which have been pushed to remote.The case is similar to : Git: Discard all changes on a diverged local branch. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |