-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Project Setup page with instructions on .gitattributes for
line endings
- Loading branch information
1 parent
cb70804
commit 5e59077
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
title: Project Setup | ||
template: docs/page.html | ||
weight: 11 | ||
|
||
extra: | ||
toc: true | ||
lead: Tips for setting up a Bones project | ||
--- | ||
|
||
This doc is WIP - | ||
|
||
### Configuring Git Repository | ||
|
||
It is recommended to setup a [.gitattributes](https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings#per-repository-settings) file in project repo to force unix line endings. | ||
|
||
Add file: `.gitattributes` to repository root with contents: | ||
``` | ||
* text eol=lf | ||
``` | ||
|
||
The `bones_asset` crate will compute "Content IDs" (or the `Cid` type in code) by hashing the contents of assets. Text based assets such as `.yaml` schema files risk having different line endings on different development platforms. This could result in divergent Content IDs, leading to issues replicating asset handles in online play using `bones_asset::NetworkHandle<T>`. Forcing all git checkouts to use Unix line endings with `.gitattributes` will resolve this issue. |