Git - force-with-lease with + in branch(refspec)

时间:2016-06-07 18:24:11

标签: git github

在当前的Git中,import * as datatable from 'datatables'; //following only once in you app i think import * as responsive from 'datatables.net-responsive'; import * as responsiveBs from 'datatables.net-responsive-bs'; import * as netBs from 'datatables.net-bs'; let responsive = responsive.default(); // to change settings? responsiveBs.default(); netBs.default(); export class Welcome { dataSet = [ ['Ken','Husband','Home'], ['Barbie','Wife','Home'] ]; attached() { // can call: responsive(settings, options); $('#example').DataTable({ select: true, data: this.dataSet, columns: [ { title: "Name" }, { title: "Position" }, { title: "Office" } ] }); } } git push --force-with-lease origin +somebranchgit push --force-with-lease origin somebranch(没有加号)之间存在实质性差异吗?这三个人似乎做了同样的事情。

我试图寻找文件。我试着查看refspec in documentation,但我不知道是否存在差异,如果是这样的话,当我想通过git push origin +somebranch拉到工作分支时,默认情况下应该更喜欢实例

1 个答案:

答案 0 :(得分:3)

  

当我想通过git pull --rebase origin master 拉到工作分支时,默认情况下应该更喜欢

我在2013 for git 1.8.5, and March 2016 for git 2.8中报告了force-with-lease

我会说......没有一个 完成pull --rebase以避免强制推送(有或没有租赁)任何东西。

我只需设置(since git 2.6

git config pull.rebase true
git config rebase.autoStash true

这允许我做一些简单的git pull,然后是简单的git push(不涉及强迫推送)