A small detail showing MacOS code teams preference

The line git commit -m 'First commit' in the section First Commit, fails on Windows:

error: pathspec 'commit'' did not match any file(s) known to git

Use double quotes instead:

c:\work\learning\redwood\redwoodblog (master)
λ git commit -m "First commit"
[master (root-commit) 1428d58] First commit
 41 files changed, 15747 insertions(+)
 create mode 100644 .editorconfig
 create mode 100644 .env.defaults
 create mode 100644 .env.example
 create mode 100644 .gitignore
 create mode 100644 .nvmrc
 create mode 100644 .vscode/extensions.json
...

This may warrant an organized effort to weed out such details (I will eventually find them also, but with a slower pace)

@adriatic Thanks for speaking up on behalf of us Windows users! :smiley:

I just tried the single quotes on my (Win10) machine, and it seems to work just fine.

tobbe@XPS9550 MINGW64 ~/dev/redwood/test-crwa-project
$ git init .
Initialized empty Git repository in C:/Users/tobbe/dev/redwood/test-crwa-project/.git/

tobbe@XPS9550 MINGW64 ~/dev/redwood/test-crwa-project (main)
$ git add .
warning: CRLF will be replaced by LF in yarn.lock.
The file will have its original line endings in your working directory

tobbe@XPS9550 MINGW64 ~/dev/redwood/test-crwa-project (main)
$ git commit -m 'First commit'
[main (root-commit) 45148fc] First commit
 40 files changed, 15774 insertions(+)
 create mode 100644 .editorconfig
 create mode 100644 .env.defaults
 create mode 100644 .env.example
 create mode 100644 .gitignore
 create mode 100644 .vscode/extensions.json
 create mode 100644 .vscode/launch.json
 create mode 100644 .vscode/settings.json
 create mode 100644 LICENSE
 create mode 100644 README.md
 create mode 100644 api/.babelrc.js
 create mode 100644 api/db/schema.prisma
 create mode 100644 api/db/seeds.js
 create mode 100644 api/jest.config.js
 create mode 100644 api/jsconfig.json
 create mode 100644 api/package.json
 create mode 100644 api/src/functions/graphql.js
 create mode 100644 api/src/graphql/.keep
 create mode 100644 api/src/lib/db.js
 create mode 100644 api/src/services/.keep
 create mode 100644 babel.config.js
 create mode 100644 graphql.config.js
 create mode 100644 package.json
 create mode 100644 prettier.config.js
 create mode 100644 redwood.toml
 create mode 100644 web/.babelrc.js
 create mode 100644 web/jest.config.js
 create mode 100644 web/jsconfig.json
 create mode 100644 web/package.json
 create mode 100644 web/public/README.md
 create mode 100644 web/public/favicon.png
 create mode 100644 web/public/robots.txt
 create mode 100644 web/src/Routes.js
 create mode 100644 web/src/components/.keep
 create mode 100644 web/src/index.css
 create mode 100644 web/src/index.html
 create mode 100644 web/src/index.js
 create mode 100644 web/src/layouts/.keep
 create mode 100644 web/src/pages/FatalErrorPage/FatalErrorPage.js
 create mode 100644 web/src/pages/NotFoundPage/NotFoundPage.js
 create mode 100644 yarn.lock

tobbe@XPS9550 MINGW64 ~/dev/redwood/test-crwa-project (main)
$

Are you using cmder? Could you try plain git-bash instead? Or even PS or cmd?

It is not my intent to start a benchmarking series - but assuming that the core team develops on MacOS, I want to occasionally pitch in the behavior of Redwood on the Windows platform.

One of the worst mistakes a software development management team could make is to allow the developers to choose the development platform, making the product nearly untested on other platforms. As the VP of software development, I had to constantly push on ensuring equal coverage for all platforms of interest to our customers.


A few additional observations:

  • I have a pretty fast HP machine (32 GByte memory, 1 TByte SSD drive) so I am amazed to see that a 2019 MacBook Pro can delete the complete folder in 8 seconds (it takes 32.247 seconds on my machine). @Tobbe, can you please verify this once again.

  • Another attribute that surprised me is the size of the project on disk: 575 MB (602,992,640 bytes), The Nuxt hello world application has the size on disk 106 MB (111,890,432 bytes) and do not know enough about Redwood architecture to be able to say whether such comparison is even fair.

  • I was using cmder when reporting the above git syntax issue. Throughout several years this console behaves very well on Windows, although, the vscode console is at least as good. Note that the standard cmd behaves the same as cmder

I think I know what’s going on. You’re using cmd inside cmder, right?

I tried using cmd too, and saw the same issue you reported

Microsoft Windows [Version 10.0.19041.746]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\Users\tobbe>cd dev\redwood\test-crwa-project

C:\Users\tobbe\dev\redwood\test-crwa-project>git init .
Initialized empty Git repository in C:/Users/tobbe/dev/redwood/test-crwa-project/.git/

C:\Users\tobbe\dev\redwood\test-crwa-project>git add .
warning: CRLF will be replaced by LF in yarn.lock.
The file will have its original line endings in your working directory

C:\Users\tobbe\dev\redwood\test-crwa-project>git commit -m 'First commit'
error: pathspec 'commit'' did not match any file(s) known to git

C:\Users\tobbe\dev\redwood\test-crwa-project>

Using PowerShell it works

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\tobbe> cd .\dev\redwood\test-crwa-project\
PS C:\Users\tobbe\dev\redwood\test-crwa-project> git init .
Initialized empty Git repository in C:/Users/tobbe/dev/redwood/test-crwa-project/.git/
PS C:\Users\tobbe\dev\redwood\test-crwa-project> git add .
warning: CRLF will be replaced by LF in yarn.lock.
The file will have its original line endings in your working directory
PS C:\Users\tobbe\dev\redwood\test-crwa-project> git commit -m 'First commit'
[main (root-commit) 9f7a47d] First commit
 40 files changed, 15774 insertions(+)
 create mode 100644 .editorconfig
 create mode 100644 .env.defaults
[...]
 create mode 100644 web/src/pages/NotFoundPage/NotFoundPage.js
 create mode 100644 yarn.lock
PS C:\Users\tobbe\dev\redwood\test-crwa-project>

So git-bash (mintty) and PowerShell both understand single quoted strings. The old cmd does not.
PowerShell is the default terminal in VSCode on a fresh install, so it would work there as well.

1 Like

Install

image

Delete

image

Again, this is on Windows 10 on a 2017 Dell XPS (Core i7, 16 GB ram)

Yes, as I dislike using bash on windows, a decision that leads to some unpleasant consequences. My points are:

  • It is advisable to use the most widely used quotes (double quotes work in all windows configurations as well across other supported OSs).
  • purists that feel too constrained with this suggestion, can reconfigure, both cmder as well VS Code’s console to use bash or PowerShell.
  • The section Installation & Starting Development should add a paragraph explaining these alternatives

Thanks for the considerations

I agree! We should switch to double quotes as it’s supported everywhere. Thanks for bringing this to our attention :+1:

2 Likes