diff --git a/lib/oto/commands/git/git.dart b/lib/oto/commands/git/git.dart index 216f9ee..7226622 100644 --- a/lib/oto/commands/git/git.dart +++ b/lib/oto/commands/git/git.dart @@ -57,7 +57,8 @@ class GitPush extends Command { if (data.branch == null) { shell.write(' $and git push'); } else { - shell.write(' $and git switch -c ${data.branch!}'); + shell.write( + ' $and git switch -c ${data.branch!} || git switch ${data.branch!}'); shell.write(' $and git push origin ${data.branch!}'); }