小编g_f*_*red的帖子

在iOS设备上使用网络链接调节器

如何直接在我的iOS设备上模拟各种网络条件?我知道这可以通过网络链路调节器在Mac上实现.在iOS设备上有类似的东西吗?

ios

23
推荐指数
2
解决办法
2万
查看次数

5
推荐指数
1
解决办法
4848
查看次数

Git如何改变我已推出的(个人)分支?

我读了git的书,但不知何故忘了规则,上面写着:

不要将已推送到公共存储库的提交重新绑定.

如果你遵循这个准则,你会没事的.如果你不这样做,人们会恨你,你会被朋友和家人嘲笑.

在这里,我在工作中创建了一个本地分支功能-xyz,我将其推送到远程仓库.我把它拉到另一台电脑上,做了一些工作并推了推.回到工作岗位上,我拉开了分店.经过几次提交后,我重新设置了我的分支机构.现在我已经完成了feature-xyz,并希望将其推送到远程存储库,但显然失败了以下消息:

$ git push origin feature-xyz
To git@<url>:<repo>.git
 ! [rejected]        feature-xyz -> feature-xyz (non-fast-forward)
error: failed to push some refs to 'git@<url>:<repo>.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Run Code Online (Sandbox Code Playgroud)

显然拉远程分支会产生各种冲突.所以我决定删除远程分支:

git push origin :feature-xyz

并重新创建它:

git push origin feature-xyz

但是我想知道是否有更好的工作流程不涉及删除远程分支?

git git-rebase

2
推荐指数
1
解决办法
317
查看次数

标签 统计

git ×1

git-rebase ×1

ios ×1

win-company-app ×1

windows-phone-8 ×1