A different way to git clone demo apps #2763

Closed
opened 2026-03-13 10:18:50 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @dsm23 on GitHub (Jan 25, 2026).

Is this suited for github?

  • Yes, this is suited for github

No response

Describe the solution you'd like

Hey, I was looking at the README in the nextjs demo and I remembered some sh script that payloadcms used to have in their templates for cloning a directory a little faster. Something along the lines of:

git clone -n --depth=1 --filter=tree:0 https://github.com/better-auth/better-auth my-project \
 && cd my-project && git sparse-checkout set --no-cone demo/nextjs \
 && git checkout \
 && rm -rf .git \
 && git init \
 && git add . \
 && git mv -f demo/nextjs/{.,}* . \
 && git add . \
 && git commit -m "Initial commit"

Describe alternatives you've considered

Payload have removed this in favour of create-payload-app

Additional context

No response

Originally created by @dsm23 on GitHub (Jan 25, 2026). ### Is this suited for github? - [x] Yes, this is suited for github ### Is your feature request related to a problem? Please describe. _No response_ ### Describe the solution you'd like Hey, I was looking at the README in the nextjs demo and I remembered some sh script that payloadcms used to have in their templates for cloning a directory a little faster. Something along the lines of: ``` git clone -n --depth=1 --filter=tree:0 https://github.com/better-auth/better-auth my-project \ && cd my-project && git sparse-checkout set --no-cone demo/nextjs \ && git checkout \ && rm -rf .git \ && git init \ && git add . \ && git mv -f demo/nextjs/{.,}* . \ && git add . \ && git commit -m "Initial commit" ``` ### Describe alternatives you've considered Payload have removed this in favour of create-payload-app ### Additional context _No response_
GiteaMirror added the enhancementnextjs labels 2026-03-13 10:18:50 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 25, 2026):

It sounds like you have an interesting approach for cloning demo apps using Git. While there isn't a documented feature specific to your query, this method could be beneficial for users looking to set up projects more efficiently.

If you're seeking further details or implementation advice, I encourage you to tag @better-auth-agent for more guidance! Would you like to explore other cloning methods or discuss best practices for setting up demo apps?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

@better-auth-agent[bot] commented on GitHub (Jan 25, 2026): It sounds like you have an interesting approach for cloning demo apps using Git. While there isn't a documented feature specific to your query, this method could be beneficial for users looking to set up projects more efficiently. If you're seeking further details or implementation advice, I encourage you to tag @better-auth-agent for more guidance! Would you like to explore other cloning methods or discuss best practices for setting up demo apps? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@bytaesu commented on GitHub (Jan 26, 2026):

Hi @dsm23,

Our Next.js demo app is linked through pnpm workspace to stay up to date, so cloning the repo is the cleanest way to run it locally.

Thanks for your suggestions 🙂

@bytaesu commented on GitHub (Jan 26, 2026): Hi @dsm23, Our Next.js demo app is linked through pnpm workspace to stay up to date, so cloning the repo is the cleanest way to run it locally. Thanks for your suggestions 🙂
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#2763