- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
我一直在推送到一个远程 Bitbucket 存储库,最近一位同事将他创建的一个新分支推送到了同一个存储库。
我正在尝试获取他上传的更改。
$ git branch -a
* master
localbranch1
localbranch2
remotes/origin/master
$ git branch -r origin/master
在 Bitbucket 的网络用户界面中,我可以看到他创建的分支。我该怎么做?
下次尝试:
$ git fetch bitbucket
Password for 'https://xxxxx@bitbucket.org':
From https://bitbucket.org/user/repo
* branch HEAD -> FETCH_HEAD
如果他创建的分支名为 new_branch_b,我应该期待看到以下内容吗?
$ git branch -r
origin/master
origin/new_branch_b
第三次尝试:
$ git remote update
Fetching bitbucket
Password for 'https://xxxxx@bitbucket.org':
From https://bitbucket.org/user/repo
* branch HEAD -> FETCH_HEAD
$ git branch -r
origin/master
第四次尝试:
[remote "bitbucket"]
url = https://user@bitbucket.org/user/repo.git
我调用了远程 bitbucket
而不是 origin(至少我记得是这样;我刚才设置了它)
第五次尝试:
我根据 kan's answer 更新了 Bitbucket 远程配置:
$ git config -e
[remote "bitbucket"]
url = https://user@bitbucket.org/user/repo.git
fetch = +refs/heads/*:refs/remotes/bitbucket/*
对于大多数人来说,它会被称为起源:
[remote "origin"]
url = https://user@bitbucket.org/user/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
之后,
$ git remote update
Fetching bitbucket
Password for 'https://user@bitbucket.org':
remote: Counting objects: 48, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 35 (delta 21), reused 0 (delta 0)
Unpacking objects: 100% (35/35), done.
From https://bitbucket.org/user/repo
* [new branch] branch_name1 -> origin/branch_name1
* [new branch] branch_name2 -> origin/branch_name2
....等等。
我认为 git fetch origin
也适用于 git remote update
。
最佳答案
如果您还没有更新您的 Remote :
$ git remote update
$ git branch -r
关于git - 远程分支没有出现在 "git branch -r",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12319968/
我试图让 Branch.io 在 Android 上工作,但我遇到了: myapplication.MainActivity cannot be cast to android.app.Applica
当我执行 git branch 时,我知道我在分支 v0.2 上。 git branch v0.1 * v0.2 但是当我执行 git push 时它说“你当前分支的上游分支与你当前分支的名称不
在使用 Git GUI 检查远程分支 releases/rel_5.4.1 之后,当我尝试 push 时看到了这个意外的错误消息: fatal: The upstream branch of your
SO 上有一个相关问题处理如何更改 push 命令的参数以避免出现此消息: fatal: The upstream branch of your current branch does not mat
arc feature [branch-name] 和 git branch [branch-name] 有什么区别? 他们似乎都创建了一个新分支。 最佳答案 arc feature [branch-
FIFO、LIFO 和LC Branch and Bound 有什么区别? 最佳答案 Branch & Bound 通过使用估计边界来限制可能解决方案的数量来发现完整搜索空间内的分支。不同的类型(FI
有人知道这两个切换和跟踪远程分支的命令之间的区别吗? git checkout -b branch origin/branch git checkout --track origin/branch 我
关于 git-svn 工作流程有很多问题,但我一直无法弄清楚这一点: This section of the svn book谈到 SVN 的一个常见做法:创建一个分支,并在主干更新时不断合并主干中的
我正在构建一个控制 git 存储库的 PHP 应用程序。我有一个执行命令 git status 的同步函数,虽然没有返回“你的分支是最新的”,但可能会提前采取必要的行动,比如远程或本地分支。 我还构建
是否可以使用 branch.io 创建自定义链接,例如 https://example.app.link/fzmLEhobLD所以我可以用我的自定义 10 位参数(如 amitpp8888)控制 fz
我从 github 克隆了一个分支,它的名字是 dev。我已经开始使用它, pull 和推送代码更改并确保我的本地存储库与远程存储库保持同步。我要开始实现一个新功能,因此创建了一个新分支,如下所示:
我们有一个发布模型,为简单起见,我们假设每月 1 次。所以,我们通常会去: Jan -> trunk trunk -> Feb trunk trunk et
使用 Branch.io HTTP API 创建的链接不会在 Branch 门户中显示为快速链接。快速链接很方便,因为它们在一个 View 中显示“点击”、“打开”等内容 用于创建链接的 API:li
我创建了一个分支,当我第一次从源代码合并到分支时,出现了一大堆旧的变更集,它说没有合并,但它们在分支之前就存在,我确认它们在那里。 例子: 假设当 Source 中有 9 个变更集时,我从 Sourc
这是关于我为什么这样做 不是 收到错误“致命:当前分支 A 没有上游分支”。 我删除了 远程 分公司 一个 使用命令 git push origin :A . 然后我切换到本地 分支 A 使用命令 g
我正在使用 clover 插件来检查我的 java 代码测试覆盖率。 我为所有行编写了单元测试。当我点击红线时,它显示“true分支执行了2次,分支执行了0次”。这是什么意思?我该如何解决这个问题?
很确定我误解了 git。 我的目标 我在 github 上有一个带有“master”分支的私有(private)存储库。 我还想有一个生产分支,我会将所有更改从 master 推送到该分支。 然后我想
我将一个相当老的主题分支重新定位到 master 上。由于在 rebase 期间有很多冲突,我想将旧主题分支与 rebased 分支进行比较,以确保我没有意外删除或搞砸主题上的任何更改。我最接近的是比
我正在尝试将我的一个项目推送到 github,但我一直收到此错误: peeplesoft@jane3:~/846156 (master) $ git push fatal: The current b
Jenkins Git 插件根据我的引用规范在控制台输出中生成了以下命令 下面两个命令有什么区别?他们的输出看起来没什么不同。我在下面给出了他们的输出: 命令 1: git fetch --no-ta
我是一名优秀的程序员,十分优秀!