diff --git a/node-src/ui/messages/errors/gitNotInitialized.stories.ts b/node-src/ui/messages/errors/gitNotInitialized.stories.ts index 6522b8b5a..9f482838b 100644 --- a/node-src/ui/messages/errors/gitNotInitialized.stories.ts +++ b/node-src/ui/messages/errors/gitNotInitialized.stories.ts @@ -4,4 +4,5 @@ export default { title: 'CLI/Messages/Errors', }; -export const GitNotInitialized = () => gitNotInitialized({ command: 'git --version' }); +export const GitNotInitialized = () => + gitNotInitialized({ command: 'git --version' }).replaceAll('<', '<').replaceAll('>', '>'); diff --git a/node-src/ui/messages/errors/gitNotInitialized.ts b/node-src/ui/messages/errors/gitNotInitialized.ts index 27650783d..fec13ad84 100644 --- a/node-src/ui/messages/errors/gitNotInitialized.ts +++ b/node-src/ui/messages/errors/gitNotInitialized.ts @@ -2,9 +2,21 @@ import chalk from 'chalk'; import { dedent } from 'ts-dedent'; import { error } from '../../components/icons'; +import link from '../../components/link'; export default ({ command }: { command: string }) => dedent(chalk` ${error} {bold Unable to execute command}: ${command} Chromatic only works from inside a Git repository. + + You can initialize a new Git repository with \`git init\`. + + You will also need a single commit in order to run a build. To do that: + + - Add a file (or multiple files) with \`git add \` + - Commit the file(s) with \`git commit --message=""\` + + Once you've done so, please run this build again. + + For more information on Git, feel free to check out the Pro Git book: ${link('https://git-scm.com/book/en/v2')} `);