相关疑难解决方法(0)

警告:push.default未设置; 它的隐含值在Git 2.0中发生了变化

我一直在使用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 default changes, use: 

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use: 

  git config --global push.default simple
Run Code Online (Sandbox Code Playgroud)

我显然可以将它设置为所提到的值之一,但它们是什么意思?simple和之间有什么区别matching

如果我在一个客户端上更改它,我是否需要在我共享回购的其他客户端上做任何事情?

git version-control

1615
推荐指数
3
解决办法
25万
查看次数

Git警告:push.default未设置; 它的隐含价值在变化

当我在Git中推送到远程时,我收到此警告:

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 default changes, use:

  git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

  git config --global push.default simple

See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if …
Run Code Online (Sandbox Code Playgroud)

git push

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

git - 推送电流与推送上游(跟踪)

我已经阅读了关于push命令的git man,但我仍然不明白在push.default中设置当前上游之间的确切区别

我希望我们的团队能够进行推送,并且只会对他们当前正在处理的分支进行更改.据我所知,当我做git branch时,这个分支是用*(星号)标记的分支.

谢谢你的帮助.

git

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

![已拒绝] master - > master(非快进)在新的最新分支上

在我的回购中,我有一个master分支和一个new分支.

我已经工作new了一段时间,做出了提交,并在我离开时推动.我现在决定分支new并打电话给它newest.所以我做了

git checkout -b "newest"
Run Code Online (Sandbox Code Playgroud)

并且分支已成功创建.我添加了一个文件,并开始研究它.我做了几次改变.

但是当我尝试推送这个新分支并对其进行更改时origin,我收到此错误:

C:\wamp\www\myproj>git push origin
To https://github.com/Imray/Proj.git
 ! [rejected]        master -> master (non-fast-forward)
 ! [rejected]        new -> new (non-fast-forward)
error: failed to push some refs to 'https://github.com/Imray/Proj.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the …
Run Code Online (Sandbox Code Playgroud)

git github git-pull git-push fast-forward

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

在git rebase之后,我的本地分支和远程分支发生了分歧

我有一个my-feature分支,被推到原点进行代码审查.它不是共享的.最终它将合并到我的团队中共享的develop分支中.我想将我的分支重新设置为保持历史清洁,然后将我的功能分支合并到develop中.这就是我一直在做的事情:developmy-feature

$ git checkout my-feature
// do some work. make commits.

$ git rebase develop
// fix some conflicts

$ git add .

$ git rebase --continue
Run Code Online (Sandbox Code Playgroud)

成功重新定位后,我检查状态:

$ git status
On branch my-feature
Your branch and 'origin/my-feature' have diverged,
and have 155 and 1 different commit each, respectively.
  (use "git pull" to merge the remote branch into yours)

$ git what do I do here?
Run Code Online (Sandbox Code Playgroud)

我不知道该怎么做.如果我git pull,那么我注意到我会得到一些没有意义的冲突.有人说强行推,但我很担心.强制将我的主题分支推送到原点是否正常? …

git git-pull git-rebase

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

Git提出了push.default警告

当我将git提交到我的远程存储库时,出现了这个警告:

clyde-browns-computer-2:bloccit clydiscope$ git commit -m 'Installed gem faker and generated seed    data'
[seed-data fabb6ea] Installed gem faker and generated seed data
 3 files changed, 26 insertions(+), 7 deletions(-)
clyde-browns-computer-2:bloccit clydiscope$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
clyde-browns-computer-2:bloccit clydiscope$ git merge seed-data
Updating 1811f8b..fabb6ea
Fast-forward
Gemfile      |  1 +
Gemfile.lock |  3 +++
db/seeds.rb  | 29 ++++++++++++++++++++++-------
3 files changed, 26 insertions(+), 7 deletions(-)
clyde-browns-computer-2:bloccit clydiscope$ git branch -d seed-data
Deleted branch seed-data …
Run Code Online (Sandbox Code Playgroud)

git warnings default push

4
推荐指数
1
解决办法
1682
查看次数

git push origin branchname总是推动掌握

我搜索了一下,但似乎找不到答案.

在我可以访问的两个框中,当我执行"git push --dry-run origin mytestbranch"时,我得到以下结果:

To git@bitbucket.org:rien/test.git
 * [new branch]      test -> test
Run Code Online (Sandbox Code Playgroud)

但是,在我的macbook上,当我尝试相同的命令时,我得到以下结果:

To git@bitbucket.org:rien/test.git
   417248a..cf7d564  test -> master
Run Code Online (Sandbox Code Playgroud)

只有当我明确地说推送到测试原点branch(git push --dry-run origin test:test)时它才能按预期工作.

如何更改它以便基本git push --dry-run bb test将推送到新创建的远程分支而不是主控?

我用两个盒子在盒子上创建了测试分支 git checkout -b test origin/master

编辑添加: - 两个分支都git config push.default设置为tracking.

我特别想知道如何配置git,以便在我输入时git push origin test它的行为与...相同git push origin test:test

git git-push

3
推荐指数
1
解决办法
726
查看次数