我在IntelliJ IDEA项目中启动了我的git repo.然后我点击"通过Bitbucket共享"下的"导入版本控制"注意:我已经安装了jetbrains存储库中的插件.
一切正常,我甚至可以在Bitbucket上创建回购,但是当我试图推动时,没有任何反应.当我再次尝试通过VCS> GIT> Push时,它表示没有定义遥控器.
请帮忙.我的意思是,没有任何错误信息.我设法推送到github就好了.
我不知道我是否误用了Git,或者我是否有配置问题,所以任何清晰度都会受到赞赏:)
我将我的github repos克隆到机器A和B上,然后在机器AI上:
git checkout -b branchA
// make edits
git add .
git commit -am "initial"
git push
Run Code Online (Sandbox Code Playgroud)
然后在机器B上我做
git pull
git checkout branchA
// make edits
git commit -am "edits"
git push
Run Code Online (Sandbox Code Playgroud)
在机器A我然后做:
git pull
Run Code Online (Sandbox Code Playgroud)
但它说:
There is no tracking information for the current branch
Run Code Online (Sandbox Code Playgroud)
所以我必须这样做:
git branch --set-upstream branchA origin/branchA
Run Code Online (Sandbox Code Playgroud)
:/为什么我必须设置上游,当它最初将它推送到origin/branchA没有问题?
这是怎么回事?谢谢
我正在使用msygit 1.8.在窗户上
PS当我pull在机器B上执行时,为什么branchA默认情况下不跟踪新分支?git branch不显示它(但它确实-r).我可以默认跟踪所有新的远程分支pull?
这种情况是我在远程服务器上没有存储库,只有一个帐户。然后,我在本地运行以下命令,其中x是用户名,y是仅存在于我的本地系统上的项目名称。
git init
git remote add buckety https://x@bitbucket.org/x/y.git
git add .
git commit --message "Here we go..."
git push buckety
Run Code Online (Sandbox Code Playgroud)
现在我收到错误提示我设置远程上游。我可以这样做(--set-upstream或者-u),但是根据我的 googlearching,它已被弃用。(实际上很奇怪,控制台中的建议仍然提到它。)
我想以正确的方式做到这一点,并且我已经搜索了--track和--set-upstream-to。但是,就我所见,我在 Git 上的特定场景没有示例,并且我测试的操作因错误而失败。
我应该如何在不撤回使用已弃用选项的情况下创建远程分支?我可能想在远程创建一个跟踪分支,以便:
最好,我想在推送之前配置它,但我不确定如何配置。我无法使用结帐,因为该分支尚不存在。出于同样的原因,我不能使用set-upstream-to。
git和github的新功能.
我想在本地和远程替换master我的其他分支的git 分支bridge.问题是git无法解析bridge分支的引用.问题来自推向github.
git树是如何形成的:
为了规避,我创建了另一个名为bridge的分支.我不喜欢我已将网桥设为默认设置,因此我尝试将其更改为主设备使用:
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
它在当地工作.但是,当我试图推动时,我得到以下内容:
NAME@**** /C/Users/NAME/Documents/GitHub/tabtrack (master) $ git push warning: push.default is unset; its implicit value is changing in Git 2.0 from 'matching' to 'simple'. To squelch this message and maintain the current behavior after the …
在尝试通过 jenkins 构建 git 项目时,它给出了一个错误“错误:找不到任何要构建的修订版”。验证此作业的存储库和分支配置。Finished: FAILURE' 这个错误是什么意思,我应该怎么做才能删除它?
我使用以下命令将我的一个github存储库克隆到我的办公桌面计算机
git clone git://github.com/indiajoe/MyRepo.git
Run Code Online (Sandbox Code Playgroud)
在进行一些更改并提交之后,我无法使用命令将更改推回到存储库,
git push -u orgin master
Run Code Online (Sandbox Code Playgroud)
以下是错误消息.
fatal: 'orgin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
我试图重新输入地址,如下所示.
git remote rm origin
git remote add origin https://github.com/indiajoe/MyRepo.git
Run Code Online (Sandbox Code Playgroud)
即使在此之后,我也遇到了同样的错误.我的git remote -v的输出是
origin https://github.com/indiajoe/MyRepo.git (fetch)
origin https://github.com/indiajoe/MyRepo.git (push)
Run Code Online (Sandbox Code Playgroud)
这可能会出错?
PS:克隆时我无法通过以下命令通过https进行
git clone https://github.com/indiajoe/MyRepo.git
Run Code Online (Sandbox Code Playgroud)
但它克隆没有任何问题的命令,
git clone git://github.com/indiajoe/MyRepo.git
Run Code Online (Sandbox Code Playgroud)
我不知道,为什么会这样.但这可能是一个相关问题吗?
我需要第一次将我的更改推送到远程仓库
// I added the other repo as a remote
$ git remote add devstage -f <Other-Repo>
// Merged the files from devstage to my local
$ git merge devstage/master -s recursive -X ours
// Executing Everything up-to-date
$ git push devstage HEAD
Run Code Online (Sandbox Code Playgroud)
但这些文件并未真正推向Other-Repo.
我错过了什么?我当地的所有文件都没有上演.如果我打开一个文件暂存并将其推送到遥控器,它将被推送.
我正在将我的主分支推送到我的GIT仓库并发生此错误
fatal: 'master' does not appear to be a git repository
Run Code Online (Sandbox Code Playgroud)
根据我输入的堆栈问题的建议
git remote -v
Run Code Online (Sandbox Code Playgroud)
得到了
heroku https://git.heroku.com/peaceful-cove-8372.git (fetch)
heroku https://git.heroku.com/peaceful-cove-8372.git (push)
origin https://github.com/SimonWalsh1000/breathe.git (fetch)
origin https://github.com/SimonWalsh1000/breathe.git (push)
Run Code Online (Sandbox Code Playgroud)
然后我打字
simonalice$ git push -u origin master
Run Code Online (Sandbox Code Playgroud)
它有效,但说
Branch master set up to track remote branch master from origin.
Run Code Online (Sandbox Code Playgroud)
我对GIT很新,我不完全确定发生了什么.如果有人能向我解释这个序列,我将非常感激.我一直无法得到明确的答案.现在是我的主分支,GIT中的主分支还是一些克隆?
非常感谢