Hi.
------ Original Message ------
From: "Sven Strickroth" <
sv...@cs-ware.de>
To:
tortoise...@googlegroups.com
Sent: 19.12.2016 19:28:51
Subject: Re: is that possible to block a push when a repo is tuned to do
a pull with rebase
>Hi George,
>
>your mail is missing important information: Which version of
>TortoiseGit
>and Git are you using?
Latest stable versions of all products:
TortoiseGit 2.3.0 64 bits
GitExtensions 2.48.90 (RC1)
git version 2.8.4.windows.1 64 bits
Windows 10 Pro 64 bits, if it's important.
>Am 19.12.2016 um 17:11 schrieb
george...@gmail.com:
>> Git Extensions have a very useful feature of blocking a push if there
>> are pending commits to pull & I previously issued
>>>git config branch.master.rebase true
>> or
>>>git config branch.autosetuprebase always
>
>TortoiseGit should support both options. You can also use the "Rebase
>after fetch" option in the pull dialog which automatically starts the
>rebase dialog.
There are no problems with pull, only with commit.
>
>How does Git extensions know whether there are pending commits?
I don't know :) perhaps it issues a query to the server, requesting the
most recent commit SHA1.
>> Is that possible to implement the same functionality in TortoiseGit
>>to
>> get rid of the Git Extensions completely?
>I'm not sure whether I understood all details. Can you please try to
>explain with more details and maybe an example workflow?
It's easy - when I finish all preparations for push, I click Push (or
Commit-n-Push) in GitExtensions, and receive a modal dialog with text:
"There're pending commits in a repository, do you want to pull it
first?". After clicking Yes GitExtensions performs an usual pull with
rebase, and only then pushes my own commits, thus keeping a repo linear.
TortoiseGit simply makes a push anyway, creating a merge commit if there
were some commits after my HEAD.