[TYPO3-dev] GIT Problem with Rebase origin/TYPO3_4-5

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Apr 20 08:55:24 CEST 2012


Stefan Geith schrieb am 17.04.2012 15:57:
> 
> 
> Am 17.04.2012 15:02, schrieb Steffen Ritter:
>> Hi,
>> switching between branches, that may or may not have submodules included
>> already always will lead to problems.
>> Therefore you must delete the according directories / submodule pointer
>> manually and then do git reset --hard
> 
> I now solved my problem doing e.g for workspaces
>   > cd typo3/sysext/workspaces
>   > git fetch --all
>   > git checkout e6f59e7bac441d08e04f214a8532c6548bbeb106
> Which is the same revision as in origin/TYPO3_4-5
> 
> But how would I do it correctly ?
> Should I do a
>   > git submodule foreach git reset --hard
> before or after the rebase ?
> 
> Or schould I do as the very first thing:
>   > git fetch --all; git submodule foreach git fetch --all

I would say that a "git reset --hard" in the main directory and a "git
submodule update --init" would suffice.

But the overall suggestion I have would be to (as Steffen Ritter already
mentioned) never switch between minor release branches (4.5 > 4.6 etc)
in the same GIT working copy. Use different working copies for that and
if you want to save some space and network activity, use a shared GIT
object database. See this resource [1] to learn how to do it.

Cheers,
Ernesto

[1] http://wiki.typo3.org/Multiple_Branch_Setup



More information about the TYPO3-dev mailing list