| tags |
|
|---|
When using Entangled in conjunction with Git, there are a few tricks that you may want to know about.
When you edited both Markdown and code without the daemon running, you may need to do some tricks to get back into a consistent state.
git add .
git commit -m 'fixed everything' # save everything you did
entangled tangle --force # overwrites some changes you made
git restore src/brilliant_code.c # retrieve from latest commit
touch src/brilliant_code.c # set modification time of the file
entangled stitch # apply changes back to markdown
git add .
git commit --amend # amend your commit to perfectionThere may be better/faster ways to do this.
Entangled can get confused when you merge, and there is a conflict on .entangled/filedb.json. This file keeps track of which files are sources for Entangled and which ones are generated by Entangled. That way, Entangled will never overwrite files it isn't supposed to, and the other way around, when you rename a target, the old one gets removed. It is very hard to merge this file though. When you need to, you can regenerate this file using:
entangled resetThis will perform the tangle as if it is the first time, but it won't actually write files (except the database).