Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save raymelon/982dbebe2f4b9b4edae8a9065731016e to your computer and use it in GitHub Desktop.

Select an option

Save raymelon/982dbebe2f4b9b4edae8a9065731016e to your computer and use it in GitHub Desktop.
initialize empty local repo with gitkeep - FOR NEW OpenCode projects
# PowerShell
# who needs this? OpenCode - OpenCode needs git to associate chat sessions to a project
# without a git repo, a session is designated to "default" global no-project bucket - where sessions with no projecs are mixed - very disorganized imo
#
# this init script aims to address that by making every chat session associated with the project right away
# RUN THIS INIT SCRIPT BEFORE YOU START AN OPENCODE SESSION FOR A NEW PROJECT
New-Item -Path .gitkeep -ItemType File; git init --initial-branch=main; git add .gitkeep; git commit -m "init: .gitkeep";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment