Hydrostatic transmission for a work vehicle, comprising a variable displacement electronically-controlled hydraulic pump and a variable displacement hydraulically-controlled hydraulic motor hydraulically connected to each other, wherein the hydraulic pump is arranged to be mechanically coupled to an internal combustion engine of the vehicle, and the hydraulic motor is arranged to be mechanically connected to driving wheels of the vehicle, wherein the hydrostatic transmission further comprises an electronic control unit for controlling the operation of the hydrostatic transmission, the electronic control unit being configured to generate drive currents (i d1, i d2) for adjusting the displacement of the hydraulic pump based on information, provided by suitable sensors of the vehicle, relating to the position of an accelerator pedal of the vehicle, the position of a brake pedal of the vehicle, the position of a FNR (Forward-Neutral-Reverse) switch of the vehicle, the speed of the vehicle and the speed of the engine, and wherein the electronic control unit is programmed in such a manner that when it establishes, based on the information received from the FNR switch, that the operator has requested to carry out a direction inversion manoeuvre from the current direction to a final direction opposed to the current one, and the electronic control unit being characterized in that it reduces the drive current (i d1) associated to the current direction first with a first decreasing rate, as long as the vehicle speed is equal to or higher than a first threshold value (v 1) and then with a second decreasing rate higher than the first one, as soon as the vehicle speed becomes lower than said first threshold value (v 1) and as long as the vehicle speed is higher than a second threshold value (v 2) smaller than the first one (v 1), and, once the vehicle speed is below said second threshold value (v 2), it sets to a minimum value the drive current (i d1) associated to the current direction and starts to increase the drive current (i d2) associated to the final direction up to a desired value. wherein the hydraulic pump is arranged to be mechanically coupled to an internal combustion engine of the vehicle, and the hydraulic motor is arranged to be mechanically connected to driving wheels of the vehicle, wherein the hydrostatic transmission further comprises an electronic control unit for controlling the operation of the hydrostatic transmission, the electronic control unit being configured to generate drive currents (i d1, i d2) for adjusting the displacement of the hydraulic pump based on information, provided by suitable sensors of the vehicle, relating to the position of an accelerator pedal of the vehicle, the position of a brake pedal of the vehicle, the position of a FNR (Forward-Neutral-Reverse) switch of the vehicle, the speed of the vehicle and the speed of the engine, and wherein the electronic control unit is programmed in such a manner that when it establishes, based on the information received from the FNR switch, that the operator has requested to carry out a direction inversion manoeuvre from the current direction to a final direction opposed to the current one, and the electronic control unit being characterized in that it reduces the drive current (i d1) associated to the current direction first with a first decreasing rate, as long as the vehicle speed is equal to or higher than a first threshold value (v 1) and then with a second decreasing rate higher than the first one, as soon as the vehicle speed becomes lower than said first threshold value (v 1) and as long as the vehicle speed is higher than a second threshold value (v 2) smaller than the first one (v 1), and, once the vehicle speed is below said second threshold value (v 2), it sets to a minimum value the drive current (i d1) associated to the current direction and starts to increase the drive current (i d2) associated to the final direction up to a desired value.