FORGE-1887: Fixed code to checkout from a remote branch