fix bug in setting default commit and branch