I use Needle with Unity. With my Repository commits I have always trouble with the node_modules folder.
Can I put it to my Repository ignore list?
Or is there something else I have to ignore?
Yes, you can add the node_modules
folder to your repository’s ignore list by including the following line in your .gitignore
file:
node_modules/
You should also consider ignoring other common folders and files that do not need to be version-controlled using the following entries, which are present in the provided documentation:
assets/
src/generated/
dist/
stats.html
include/draco/
include/ktx2/
include/three/
include/console/
include/three-mesh-ui-assets/
include/fonts/
build.log
In summary, adding these entries can help keep your repository clean by excluding files that don’t need concern during commits, especially for libraries like Needle Engine with Unity (see the documentation) (see the documentation).
1 replies left - Get a PRO license for more AI replies.
thread_erTal8hstP9SLTJ1vlEq2Tcj
Reply to this message to continue the conversation
How to set assets/
from the Needle Data in Unity projects to ignore list, without ignoring the Unity project assets/ folder?
To ignore the assets/
folder created by the Needle Engine in Unity projects while keeping the main Unity project assets, you need to specify a more targeted path in your .gitignore
file. Instead of adding just assets/
, you should include a relative path to the Needle-generated assets.
For example, you can add the following entry to your .gitignore
file:
/Assets/Needle/*
This will ignore all content in the Assets/Needle
directory, while still allowing Unity’s Assets/
folder and its contents (like project assets) to be tracked.
By specifying the exact path to the Needle assets, you ensure that only those specific files and folders are ignored (see the documentation).
1 replies left - Get a PRO license for more AI replies.
thread_erTal8hstP9SLTJ1vlEq2Tcj
Reply to this message to continue the conversation
If i do ignore like you said, i will ignore all my custom script files too. That is not possible.
I understand your concern, . To ignore only the specific folder generated by Needle while keeping your custom scripts intact, you can use a more targeted approach.
Instead of ignoring everything in Assets/Needle
, specify only the subfolders or files that Needle generates. For example, if Needle generates a specific directory structure that you want to ignore, you can use:
/Assets/Needle/Data/
If you have custom scripts inside the Assets/Needle
folder and want to keep them, ensure to structure your .gitignore
file to be selective. Here’s an example:
# Ignore only the Needle-generated Data folder
/Assets/Needle/Data/
# Keep other files/scripts
!Assets/Needle/YourCustomScripts/
This way, you will ignore only the specified directory while retaining any custom scripts in the other folders. Adjust the paths accordingly based on where Needle generates its files.
0 replies left - Get a PRO license for more AI replies.
thread_erTal8hstP9SLTJ1vlEq2Tcj
Reply to this message to continue the conversation
Hello @NickiLeupoldXRE it seems like you’re editing your repository root gitignore file but the bot suggested to edit the .gitignore
file inside the Needle Engine web project - then ignoring assets
will not affect your Unity project at all.
If you prefer doing it from your root gitignore then you can enter the relative path to your web project <path>/<to>/<web_project>/assets
Thanks.
But i’m using Unity Version Control (Plastic SCM).
.gitignore
will not work. It’s a little different.
But i think i found a got workaround. I try to avoid using project names for the needle data.
The main thing i wanted to know which folders i can put into the ignore list.
So what i know not is i need to keep "Needle\src" because of the custom scripts and "Needle\dist" to keep the current custom build.
Understood – good to know you’re havint this issue with Unity’s Version Control, we can look into that.
For what folders etc. are ignored, you can check the existing .gitignore in the web project – that’s the complete list/patterns.
If you come up with an ignore file that works for Unity VCS, would be great if you share it here!