diff --git a/dist/index.js b/dist/index.js
index 0761a94..109373b 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -14518,6 +14518,9 @@ function getInputs() {
                 result.ref = `refs/heads/${result.ref}`;
             }
         }
+        if (result.isGist && !result.ref && !result.commit) {
+            result.ref = 'refs/heads/master';
+        }
     }
     // SHA?
     else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) {
diff --git a/src/input-helper.ts b/src/input-helper.ts
index e3e823b..84c9707 100644
--- a/src/input-helper.ts
+++ b/src/input-helper.ts
@@ -76,6 +76,10 @@ export function getInputs(): IGitSourceSettings {
         result.ref = `refs/heads/${result.ref}`
       }
     }
+
+    if (result.isGist && !result.ref && !result.commit) {
+      result.ref = 'refs/heads/master'
+    }
   }
   // SHA?
   else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) {