-
Notifications
You must be signed in to change notification settings - Fork 445
Unable to commit changes - Temp/Unitylockfile error #1039
Comments
This file is not locked by any external process, so it looks like Github Unity is getting in its own way (unless this is a standard Unity file?) |
This is a standard Unity file, I don't know why you're getting this error, as the |
@jwvanderbeck If you're still around, let me know! |
Find Temp/UnityLockfile in the changed files on the left in Github Desktop. |
For anyone else having this problem, my solution was to change my .gitignore file to have a wild card before all the unity folders. My git directory was one folder above my unity project(so like "Gitfolder/UnityProject/Temp"), and as it looks like the .gitignore was expecting to be at the same level as the Temp folder(and other folders) it was not excluding the folders. Not sure if this will break anything, if not I would suggest GitHub change their default unity ignore file. Uhm, also does someone know how to post their gitignore file? I tried code, which as you can see bellow didn't work out well. `# This .gitignore file should be placed at the root of your Unity project directory Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore*/[Ll]ibrary/ Never ignore Asset meta data!/[Aa]ssets/**/*.meta Uncomment this line if you wish to ignore the asset store tools plugin/[Aa]ssets/AssetStoreTools*TextMesh Pro files/[Aa]ssets/TextMeshPro/ Autogenerated Jetbrains Rider plugin/[Aa]ssets/Plugins/Editor/JetBrains Visual Studio cache directory*/.vs/ Gradle cache directory.gradle/ Autogenerated VS/MD/Consulo solution and project files*ExportedObj/ Unity3D generated meta files*.pidb.meta Unity3D generated file on crash reports*/sysinfo.txt Builds*.apk Crashlytics generated filecrashlytics-build.properties ` |
@78Star If you'll note the comment at the very top of the file, it is intended to be placed in the root of your Unity project. If you choose to put it somewhere else then yeah it won'r work right an you will need to adjust accordingly. That isn't GitHub's responsibility really. |
Hello. |
For me, closing Unity just to add the objects and commit worked. |
Yes, this worked for me too :) |
@vicentselfa HI, i know temp file are unnecessary but did it cause any unpredictable errors? |
Don't forget to change the .gitignore in the repository folder: It should have something like this: Remove the first slashes: |
@78Star Alexander. I'm liking your explanation of the issue... but I'm way confused by the labeling of the |
See details at github-for-unity/Unity#1039 The git directory was one folder above the unity project(so like "Gitfolder/UnityProject/Temp"), and as it looks like the .gitignore was expecting to be at the same level as the Temp folder(and other folders) it was not excluding the folders.
Add UnityLockfile github-for-unity/Unity#1039
For me it was about having the unity editor open while adding files to commit. |
i can solve this problem by just close my unity project do commit again |
How are you using Github for Unity without having Unity running? Clearly closing the editor and using normal Git or another Github tool will work. But this issue was about the Github for Unity tool which is a Git UI inside the Unity editor. |
Where did you write this? |
@elvinsadiq In the root of your Unity project - the directory that has the
This will make sure your |
I after closing unity, it let me do my commit as @dnenov suggested, thanks! |
Prerequisites
%LOCALAPPDATA%\GitHubUnity\github-unity.log
~/Library/Logs/GitHubUnity/github-unity.log
~/.local/share/GitHubUnity/github-unity.log
Description
Unable to commit changes.
Steps to Reproduce
Expected behavior:
I expect the changes to be commited
Actual behavior:
After processing, the list of files under changes does not change and nothing is actually commited.
Reproduces how often:
100%
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.
The text was updated successfully, but these errors were encountered: