• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
0
Question by roome0 · Feb 14, 2017 at 02:27 PM · unity 5gitgithubsource-control

How to get rid of unity lockfile

Whenever i start up unity it creates two files (seen in the gyazo link)

https://gyazo.com/bd0d7cefa8bdc651be7405cbcc0fc45e

these files make it impossible for me to commit anything while unity is still opened, when i close unity the files disappear.

I've tried the solution stated in http://answers.unity3d.com/questions/1238437/do-you-need-to-close-unity-to-stage-files-in-sourc.html

but it doesnt work for me.

Can someone please help me because i dont want to close unity everytime i want to commit.

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Cout_Nico_F · Dec 07, 2020 at 08:31 PM 0
Share

I know this post is old but for anyone that can use this i will say: When working in unity with github the .gitignore file needs to be INSIDE the root folder of the project. Where the Assets/Library etc folders are. If you have the gitignore file outside this folder it wont work as expected.

3 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by roome0 · Feb 14, 2017 at 02:33 PM

nevermind i actually fixed it myself, had the gitignore for global folders like the temp folder, but i had to rewrite it specifically for my game.

/[Tt]emp/ this is what i had

changed it into Crozzit/[Tt]emp/

and it works

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image user75641 · Jul 08, 2019 at 02:59 AM 0
Share

it does work, that is if you replace "Crozzit/[Tt]emp" with your game name and add "/[Tt]emp" on the front

avatar image Cout_Nico_F · Dec 06, 2020 at 08:39 PM 0
Share

I know this post is old but for anyone that can use this i will say: When working in unity with github the .gitignore file needs to be INSIDE the root folder of the project. Where the Assets/Library etc folders are. If you have the gitignore file outside this folder it wont work as expected. This is why you needed to add your folder name there

avatar image
0

Answer by trapazza · Mar 19, 2020 at 09:40 PM

Since lock files are intended to be used locally by Unity you can as well mark it as 'ignored'

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Cout_Nico_F · Dec 06, 2020 at 08:40 PM

GitIgnore file needs to be INSIDE the unity project folder and not outside. this is why you had this issue

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

137 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Visual Studio / Git / Unity - All files and folders I add are going into untracked files - why? 1 Answer

Can't upload project to GitLab 2 Answers

How to exclude paid assets from git tracking? 0 Answers

Unity instantly deletes Asset folder which I pull over Git - "Removing Assets/FolderName because the asset does not exists" 0 Answers

How to properly set up YAMLMerge and a merge tool on windows 0 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges