草庐IT

git - 在交互模式下运行 "git pull --rebase"?

coder 2023-06-25 原文

是否可以在交互模式下运行命令 git pull --rebase(如 git rebase -i)?

最佳答案

原始答案(2015 年 4 月)

不是真的,考虑到 git pull --rebase is not the same as a git fech + git rebase .
参见 what does " git pull --rebase " do?


2016 年 1 月更新

Git 2.8(2016 年 3 月)将允许有一个 pull --rebase互动!

参见 commit 17c4ddb , commit b5496d4 , commit f5eb87b (2016 年 1 月 13 日)作者:Johannes Schindelin ( dscho ) .
(由 Junio C Hamano -- gitster -- merge 于 commit f9219c0 ,2016 年 1 月 26 日)

pull: allow interactive rebase with --rebase=interactive

A couple of years ago, I found the need to collaborate on topic branches that were rebased all the time, and I really needed to see what I was rebasing when pulling, so I introduced an interactively-rebasing pull.

The way builtin pull works, this change also supports the value 'interactive' for the 'branch.<name>.rebase' config variable, which is a neat thing because users can now configure given branches for interactively-rebasing pulls without having to type out the complete --rebase=interactive option every time they pull.


2018 年 8 月更新,Git 2.19:

git pull --rebase=interactive”学会了“i”作为 “interactive”。

参见 commit 46af44b (2018 年 8 月 4 日)Johannes Schindelin ( dscho ) .
(由 Junio C Hamano -- gitster -- merge 于 commit c757aa2 ,2018 年 8 月 17 日)

pull --rebase=<type>: allow single-letter abbreviations for the type

'Git for Windows' original 4aa8b8c (Teach 'git pull' to handle --rebase=interactive, 2011-10-21) had support for the very convenient abbreviation

git pull --rebase=i

which was later lost when it was ported to the builtin git pull, and it was not introduced before the patch eventually made it into Git as f5eb87b (pull: allow interactive rebase with --rebase=interactive, 2016-01-13, Git 2.8.0).

However, it is really a useful short hand for the occasional rebasing pull on branches that do not usually want to be rebased.

So let's reintroduce this convenience, at long last.


在 Git 2.26(2020 年第一季度)中,“ git remote rename X Y ”需要调整配置变量(例如 branch.<name>.remote ),其值曾经是 XY .
branch.<name>.pushRemote现在也更新了。

参见 commit b3fd6cb (2020 年 2 月 1 日)和 commit f2a2327 , commit 923d4a5 , commit ceff1a1 , commit 1a83068 , commit 88f8576 (2020 年 1 月 27 日)作者:Bert Wesarg ( bertwesarg ) .
(由 Junio C Hamano -- gitster -- merge 于 commit d0038f4 ,2020 年 2 月 25 日)

pull --rebase/remote rename: document and honor single-letter abbreviations rebase types

Signed-off-by: Bert Wesarg

When 46af44b07d ("pull --rebase=<type>: allow single-letter abbreviations for the type", 2018-08-04, Git v2.19.0-rc0 -- merge listed in batch #7) landed in Git, it had the side effect that not only 'pull --rebase=<type>' accepted the single-letter abbreviations but also the 'pull.rebase' and 'branch.<name>.rebase' configurations.

However, 'git remote rename' did not honor these single-letter abbreviations when reading the 'branch.*.rebase' configurations.

We now document the single-letter abbreviations and both code places share a common function to parse the values of 'git pull --rebase=*', 'pull.rebase', and 'branches.*.rebase'.

The only functional change is the handling of the branch_info::rebase value.
Before it was an unsigned enum, thus the truth value could be checked with branch_info::rebase != 0. But enum rebase_type is signed, thus the truth value must now be checked with branch_info::rebase >= REBASE_TRUE

关于git - 在交互模式下运行 "git pull --rebase"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29717502/

有关git - 在交互模式下运行 "git pull --rebase"?的更多相关文章

  1. ruby - 如何从 ruby​​ 中的字符串运行任意对象方法? - 2

    总的来说,我对ruby​​还比较陌生,我正在为我正在创建的对象编写一些rspec测试用例。许多测试用例都非常基础,我只是想确保正确填充和返回值。我想知道是否有办法使用循环结构来执行此操作。不必为我要测试的每个方法都设置一个assertEquals。例如:describeitem,"TestingtheItem"doit"willhaveanullvaluetostart"doitem=Item.new#HereIcoulddotheitem.name.shouldbe_nil#thenIcoulddoitem.category.shouldbe_nilendend但我想要一些方法来使用

  2. ruby-on-rails - rails : "missing partial" when calling 'render' in RSpec test - 2

    我正在尝试测试是否存在表单。我是Rails新手。我的new.html.erb_spec.rb文件的内容是:require'spec_helper'describe"messages/new.html.erb"doit"shouldrendertheform"dorender'/messages/new.html.erb'reponse.shouldhave_form_putting_to(@message)with_submit_buttonendendView本身,new.html.erb,有代码:当我运行rspec时,它失败了:1)messages/new.html.erbshou

  3. ruby-on-rails - 由于 "wkhtmltopdf",PDFKIT 显然无法正常工作 - 2

    我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-

  4. ruby-on-rails - Rails - 子类化模型的设计模式是什么? - 2

    我有一个模型:classItem项目有一个属性“商店”基于存储的值,我希望Item对象对特定方法具有不同的行为。Rails中是否有针对此的通用设计模式?如果方法中没有大的if-else语句,这是如何干净利落地完成的? 最佳答案 通常通过Single-TableInheritance. 关于ruby-on-rails-Rails-子类化模型的设计模式是什么?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.co

  5. ruby - 解析 RDFa、微数据等的最佳方式是什么,使用统一的模式/词汇(例如 schema.org)存储和显示信息 - 2

    我主要使用Ruby来执行此操作,但到目前为止我的攻击计划如下:使用gemsrdf、rdf-rdfa和rdf-microdata或mida来解析给定任何URI的数据。我认为最好映射到像schema.org这样的统一模式,例如使用这个yaml文件,它试图描述数据词汇表和opengraph到schema.org之间的转换:#SchemaXtoschema.orgconversion#data-vocabularyDV:name:namestreet-address:streetAddressregion:addressRegionlocality:addressLocalityphoto:i

  6. ruby - 如何每月在 Heroku 运行一次 Scheduler 插件? - 2

    在选择我想要运行操作的频率时,唯一的选项是“每天”、“每小时”和“每10分钟”。谢谢!我想为我的Rails3.1应用程序运行调度程序。 最佳答案 这不是一个优雅的解决方案,但您可以安排它每天运行,并在实际开始工作之前检查日期是否为当月的第一天。 关于ruby-如何每月在Heroku运行一次Scheduler插件?,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.com/questions/8692687/

  7. ruby - 检查 "command"的输出应该包含 NilClass 的意外崩溃 - 2

    为了将Cucumber用于命令行脚本,我按照提供的说明安装了arubagem。它在我的Gemfile中,我可以验证是否安装了正确的版本并且我已经包含了require'aruba/cucumber'在'features/env.rb'中为了确保它能正常工作,我写了以下场景:@announceScenario:Testingcucumber/arubaGivenablankslateThentheoutputfrom"ls-la"shouldcontain"drw"假设事情应该失败。它确实失败了,但失败的原因是错误的:@announceScenario:Testingcucumber/ar

  8. ruby-on-rails - 如何在 ruby​​ 中使用两个参数异步运行 exe? - 2

    exe应该在我打开页面时运行。异步进程需要运行。有什么方法可以在ruby​​中使用两个参数异步运行exe吗?我已经尝试过ruby​​命令-system()、exec()但它正在等待过程完成。我需要用参数启动exe,无需等待进程完成是否有任何ruby​​gems会支持我的问题? 最佳答案 您可以使用Process.spawn和Process.wait2:pid=Process.spawn'your.exe','--option'#Later...pid,status=Process.wait2pid您的程序将作为解释器的子进程执行。除

  9. ruby - 无法运行 Rails 2.x 应用程序 - 2

    我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby​​:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r

  10. ruby - 如何在续集中重新加载表模式? - 2

    鉴于我有以下迁移:Sequel.migrationdoupdoalter_table:usersdoadd_column:is_admin,:default=>falseend#SequelrunsaDESCRIBEtablestatement,whenthemodelisloaded.#Atthispoint,itdoesnotknowthatusershaveais_adminflag.#Soitfails.@user=User.find(:email=>"admin@fancy-startup.example")@user.is_admin=true@user.save!ende

随机推荐