赞
踩
1 git branch -m 旧分支名 新分支名
2 git push --delete origin 旧分支名
3 git push origin 新分支名
// 追踪 origin/远程分支 到 本地分支
4 git branch --set-upsteam-to=origin/远程分支名称 本地分支名称
// 此时 ,本地有了新的分支,远程也有了新的分支,但是当我执行 git pull 时,发生了问题:
5 git pull
% git pull
hint: Pulling without specifying how to reconcile divergent branches is
hint: discouraged. You can squelch this message by running one of the following
hint: commands sometime before your next pull:
hint:
hint: git config pull.rebase false # merge (the default strategy)
hint: git config pull.rebase true # rebase
hint: git config pull.ff only # fast-forward only
hint:
hint: You can replace “git config” with “git config --global” to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
Already up to date.
git拉
提示:不指定如何协调不同分支的拉取是错误的
提示:气馁。您可以通过运行以下命令之一来抑制此消息
提示:下一次拉动前的某个时间命令:
提示:
提示:git config pull.rebase false#merge(默认策略)
提示:git config pull.rebase true#rebase
提示:git config pull.ff only#fast forward only
提示:
提示:您可以将“git config”替换为“git config–global”来设置默认值
提示:所有存储库的首选项。你也可以传递-回退,–不回退,
提示:或–ff仅在命令行上覆盖配置的默认值
提示:调用。
已经更新了。
//执行一下默认策略就行了 the default strategy
6 git config pull.rebase false
7 git pull
// Already up to date.
ok
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。