相关疑难解决方法(0)

强迫我的本地主人成为原点/主人

我让master和origin/master陷入困境,不再对该分支的变化感兴趣.

我按照这些说明让我的本地主人指向正确的位置 使当前的git分支成为主分支

 git checkout better_branch
 git merge --strategy=ours master    # keep the content of this branch, but record a merge
 git checkout master
 git merge better_branch             # fast-forward master up to the merge
Run Code Online (Sandbox Code Playgroud)

哪个工作正常,除了git status给出

C:\data\localprojects\Beko2011Azure [master]> git status

# On branch master
# Your branch and 'origin/master' have diverged,
# and have 395 and 2 different commits each, respectively.
#
nothing to commit, working directory clean
Run Code Online (Sandbox Code Playgroud)

所以我现在如何说服origin/master(github)反映我的主人.可以安全地放弃在原点/主人身上孤立的任何东西.

git branch github

30
推荐指数
1
解决办法
3万
查看次数

标签 统计

branch ×1

git ×1

github ×1