Make the instance a plain repository
$ grim adopt
Projects created before grim adopt existed kept almost nothing in git. The repository tracked grim.json, grim.lock and a .gitignore that ignored everything else, and every module and theme was a git clone of its own. Now a project is a plain git repository: core, modules, themes and your own code are ordinary tracked directories, and only dependencies, .env, storage/, build output and caches stay out.
grim install, update, require, remove, prune and push refuse a project on the old model and point here. grim up, build, deploy and artisan keep working, so a running project is not interrupted. grim adopt converts the project once.
Usage
$ grim adopt
$ git add -A && git commit -m "chore(grim): adopt model A (core 1.3.36)"Run it from the project root. It needs no network and no login.
Arguments and options
Turn an instance on the old model into a plain git repository (one-off)
Usage
grim adoptWhat it actually does
- Checks every module and theme clone. Removing a clone's
.gitkeeps its files and loses whatever only the clone knew. So each clone must have no uncommitted changes, and itsHEADmust be the commitgrim.lockrecords. If any clone fails the check,grim adoptlists it with the reason and changes nothing. Send the work upstream withgrim pushor discard it, then rungrim adoptagain. - Makes the project a repository with
git init, if it is not one yet. - Removes the
.gitof every module and theme. Their files stay and become part of the project. - Replaces
.gitignorewith the block grim maintains, between# >>> grimand# <<< grim. The old file is kept as.gitignore.bak. Move any line you still need below the block, then delete the backup. From here on,installandupdaterewrite only the block and never touch your lines outside it. - Prints the commit message to use.
grim adoptnever commits. The change is the whole project, and you should review it before committing.
Running it a second time changes nothing.
After adopting
grim updatewrites new releases into the working tree as a diff. Local edits are merged three ways, and conflicts are marked the way git marks them.grim pushcompares a module's directory with the tree of its installed tag and opens the pull request. It commits nothing in the project.- A teammate starts with
git clone+grim install. Their copy then matches yours, local edits included.
Related spells
grim update
Board the newest train
Move core, every module and every theme onto the newest release train grim.json allows, or a single module within the train it is on.
grim push
Send a change upstream
Turn the edits you made to one installed module or theme into a pull request against the monorepo it is released from.
grim install
Assemble the whole project
Turn grim.json into a working project by fetching core, every module and theme, writing grim.lock, building the image and starting the stack.
grim doctor
Check your circle
Check every tool grim expects on this machine, and the project you are standing in, and say what to do about what is missing.