recommiting detached commits, request function and setDeviceType function