我正在使用Git子树和我正在处理的几个项目,以便在它们之间共享一些基本代码.基本代码经常更新,升级可以在任何项目中进行,最终所有项目都会更新.
我遇到了一个问题,git报告我的子树是最新的,但是推送被拒绝了.例如:
#! git subtree pull --prefix=public/shared project-shared master
From github.com:****
* branch master -> FETCH_HEAD
Already up-to-date.
Run Code Online (Sandbox Code Playgroud)
如果我推,我应该得到一个消息,没有什么可以推动......对吗?对?:(
#! git subtree push --prefix=public/shared project-shared master
git push using: project-shared master
To git@github.com:***
! [rejected] 72a6157733c4e0bf22f72b443e4ad3be0bc555ce -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:***'
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 …Run Code Online (Sandbox Code Playgroud) 即使在阅读了这个问题之后:git-push-current-branch,我仍然很难弄清楚我应该如何编写我的git push命令.正如问题链接中所提到的,文档中并不清楚.
我想用我的'真实世界'的例子.以下是我在git status分支顶层执行命令时看到的内容:
在分支amd_qlp_tester上
您的分支在5次提交之前超过'origin/amd_qlp_tester'.
等等...
所以我的分支名称是,amd_qlp_tester但它从主分支"分支"(如果由于我的SVN背景我的条款错误).但是还有名字`origin/amd_qlp_testser'
那我怎么说出我的推送命令呢?
是这些中的任何一个:
git push origin/amd_qlp_tester?
git push origin amd_qlp_tester?
git push amd_qlp_tester?
git push origin?
git push?
Run Code Online (Sandbox Code Playgroud) 我moodle在我的Github帐户上有一个存储库,我forked来自官方存储库.
然后我在我的本地机器上克隆它.它工作正常.我创建了几个分支(在master分支下).我做了几个提交,它工作正常.
当我这样做时,我不知道我是如何得到以下错误的: git push origin master
fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
如何在不影响Github上的存储库的情况下解决错误?
我正在使用 Ubuntu 12.10
我.git/config做的内容cat $(git rev-parse --show-toplevel)/.git/config给出了:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch "master"]
[branch "MOODLE_23_STABLE"]
[branch "MOODLE_24_STABLE"]
[remote "upstream"]
url = git://git.moodle.org/moodle.git
fetch = +refs/heads/*:refs/remotes/upstream/*
Run Code Online (Sandbox Code Playgroud) 我对Mercurial相对较新,我的团队现在正在尝试将其作为Subversion的替代品.
如何将单个文件提交并推送到另一个存储库,同时保留我的工作目录中的其他修改未提交(或者至少不推送到其他存储库)?
这种情况发生在我们的数据库迁移中.我们希望将迁移提交到源代码控制,以便DBA可以在我们处理代码修改时查看和编辑它,以便与数据库迁移一起进行.这些变化还没有准备好,所以我们不想把它们全部推出去.
在颠覆中,我只是这样做:
svn add my_migration.sql
# commit only the migration, but not the other files I'm working on
svn commit -m "migration notes" my_mygration.sql
Run Code Online (Sandbox Code Playgroud)
并继续在当地工作.
这不适用于mercurial,因为当我将它推送到另一个存储库时,如果我没有删除它的更改,它希望我将它们拉下来,合并它们并将该合并提交到存储库.合并后提交不允许您省略文件,因此它会强制您提交本地存储库中的所有内容.
我能想到的最简单的事情是将文件提交到我的本地存储库,克隆我的本地存储库,从实际存储库中获取任何新的更改,合并它们并提交该合并,然后它们将我的更改推送出去.
hg add my_migration.sql
hg commit -m "migration notes" my_migration.sql
cd ..
hg clone project project-clone
cd project-clone
hg fetch http://hg/project
hg push http://hg/project
Run Code Online (Sandbox Code Playgroud)
这样可行,但感觉我错过了一些更简单的东西,某种方式告诉mercurial忽略我工作目录中已有的文件,只需进行合并并发送文件.我怀疑mercurial队列可以做到这一点,但我还没有完全搞定mq.
我正在将本地提交推送到远程git服务器并收到以下警告消息:
remote: warning: only found copies from modified paths due to too many files.
remote: warning: you may want to set your diff.renamelimit variable to at least 19824 and retry the command.
Run Code Online (Sandbox Code Playgroud)
但实际上我已经将diff.renamelimit设置为0(我认为零意味着无限制,对吧?).
$ git config --list
...
diff.renamelimit=0
Run Code Online (Sandbox Code Playgroud)
那么我该怎么做才能避免这种警告呢?谢谢.
我是一个相当新的人,git目前正在使用它来管理团队环境中的代码.我有一些变基础问题,我用它来修复它们
git checkout --ours filename.txt
git add filename.txt
git rebase --continue
Run Code Online (Sandbox Code Playgroud)
现在我想推送我的更改,然后运行以下命令
$ git push origin feature/my_feature_branch
Run Code Online (Sandbox Code Playgroud)
给我以下错误:
To ssh://git@coderepo.com:7999/repo/myproject.git
! [rejected] feature/my_feature_branch -> feature/my_feature_branch (non-fast-forward)
error: failed to push some refs to 'ssh://git@coderepo.com:7999/repo/myproject.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)
我该怎么做才能摆脱这个错误?
PS:我--force尽量避免使用该选项.
我是git以及github的新手.我在github上设置了一个repo,我可以把本地东西推到这个远程仓库.现在问题是:在我将某些内容推送到远程仓库并刷新页面之后,我可以看到更改已上传(例如,如果我写了一个readme.txt并将其推送到远程仓库,那么这样一个readme.txt不存在,推送和刷新页面后,它出现了).
那么任何人都可以自由地在github上更改我的回购吗?或者,如果我将某些内容推送到Linux内核,我可以将所做的更改添加到它并公开发布吗?
我已经阅读了xcode从哪里获取应用程序的标识符?,来自{PRODUCT_NAME}的XCode包标识符格式,并加载更多但......
我正在尝试推送推送通知并让人感到害怕
"Error Domain = NSCocoaErrorDomain Code = 3000"找不到有效的'aps-environment'权利字符串,用于应用程序"UserInfo = 0x15b200 {NSLocalizedDescription = no valid'atps-environment'权利字符串找到应用程序}"错误.
我很确定我已经正确地遵循了所有步骤,包括:
唯一认为我无法理解的是Bundle Identifier
推送证书适用于
XXXXXXXXXX.com.julianbaker.pwcnewsuk
Run Code Online (Sandbox Code Playgroud)
PwCNewUK-Info.plist中的Bundle Indentifier用于
com.julianbaker.${PRODUCT_NAME:rfc1034identifier}
Run Code Online (Sandbox Code Playgroud)
如果我手动将其更改为
com.julianbaker.pwcnewsuk
Run Code Online (Sandbox Code Playgroud)
我得到一个UDID不匹配错误,因为该应用程序被视为PwCNewsUK
当我用谷歌搜索这个问题似乎有些混乱,但它似乎必须匹配?
题:
Bundle Indentifer应该与
XXXXXXXXXX.com.julianbaker.pwcnewsuk 的推送证书相匹配?
题:
我是否需要为配置文件添加"aps-environment"权利,如果是,在何处以及如何添加?(参见http://www.airplaysdk.com/node/3174等)
喜欢iPhone开发,但有时它可能是一个headbanger!
在IDEA中,我试图推动一些提交.
我要求在远程服务器上看起来像单个操作.
我点击按下并看到以下窗口

我希望在这里看到壁球复选框但是看不到它.
请帮我.