Skip to content

Commit

Permalink
Show steps for initializing a new Git repo
Browse files Browse the repository at this point in the history
  • Loading branch information
codykaup committed Oct 4, 2024
1 parent bd798a1 commit b902a00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 2 additions & 1 deletion node-src/ui/messages/errors/gitNotInitialized.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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('<', '&lt').replaceAll('>', '&gt');
9 changes: 9 additions & 0 deletions node-src/ui/messages/errors/gitNotInitialized.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ 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 <FILE_PATH(S)>\`
- Commit the file(s) with \`git commit --message="<MESSAGE>"\`
Once you've done so, please run this build again.
`);

0 comments on commit b902a00

Please sign in to comment.