Driveline of a hybrid vehicle, in particular of an industrial or commercial vehicle, the driveline comprising: - a gearbox (GR) having an input shaft (GRIN) adapted to be connected with a thermal drivetrain (E) and an output shaft (GROUT) to drive a driving axle (DS) of a vehicle and first processing means (GRUN) configured to identify an optimal transmission ratio based on a signal of a first speed sensor (SPS1), - a main clutch (MC)interposed between said thermal drivetrain (E) and said input shaft (GRIN), - a main drive shaft (MS), interposed between the output shaft (GROUT) and said driving axle (DS), - a first auxiliary clutch (PSC) to interconnect said main drive shaft and said output shaft, wherein said main drive shaft is associable with an electric drivetrain (EE) regardless of a state of opening or closing of said first auxiliary clutch (PSC) and wherein said first speed sensor is connected stably with said main drive shaft (MS) to measure a related first speed; the driveline further comprising a second processing unit (VCU) arranged to carry out the following steps in succession to command a switching between a pure electric driving mode and a hybrid or pure thermal mode: - activating said thermal drivetrain (E), - waiting until said optimal transmission ratio of the gearbox has been entered, then - monitoring a second rotation speed of said output shaft (GROUT) by means of a second speed sensor (SPS2) associated therewith and acquisition of said first speed, - controlling a revolution speed of the thermal drivetrain so as to force a difference between said first and second speed below a predetermined threshold, - commanding a closing of said first secondary clutch (PSC) ; the driveline being characterized in that said second processing unit is configured to command a closing of said main clutch (MC) immediately after activation of said thermal drivetrain and before said identification of said optimal transmission ratio. - a gearbox (GR) having an input shaft (GRIN) adapted to be connected with a thermal drivetrain (E) and an output shaft (GROUT) to drive a driving axle (DS) of a vehicle and first processing means (GRUN) configured to identify an optimal transmission ratio based on a signal of a first speed sensor (SPS1), - a main clutch (MC)interposed between said thermal drivetrain (E) and said input shaft (GRIN), - a main drive shaft (MS), interposed between the output shaft (GROUT) and said driving axle (DS), - a first auxiliary clutch (PSC) to interconnect said main drive shaft and said output shaft, - activating said thermal drivetrain (E), - waiting until said optimal transmission ratio of the gearbox has been entered, then - monitoring a second rotation speed of said output shaft (GROUT) by means of a second speed sensor (SPS2) associated therewith and acquisition of said first speed, - controlling a revolution speed of the thermal drivetrain so as to force a difference between said first and second speed below a predetermined threshold, - commanding a closing of said first secondary clutch (PSC) ; the driveline being characterized in that said second processing unit is configured to command a closing of said main clutch (MC) immediately after activation of said thermal drivetrain and before said identification of said optimal transmission ratio. <EOS>