Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 /
avatar image
0
Question by Code_Helix · Mar 01, 2013 at 05:23 AM · git

Help with using Git for version control

I just found how to set up external version control with Unity but I am having problems as I entered /Library/ to be ignored in the .gitignore file but it still pushes those files to the repository. anyone that uses git know why it doesn't ignore that folder?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Tarlius · Mar 01, 2013 at 05:46 AM

Did you do a commit before you added them, perhaps?

If not, you may need to add some wildcards (*). Also note that you probably do want the .assets included in git. Here is the .gitignore from my project:

 .DS_Store
 Temp/*
 Library/previews/*
 Library/ScriptAssemblies/*
 Library/cache/*
 Library/metadata/*
 Library/*
 !Library/*.asset
 
 *.userprefs
 *.sln
Comment
Add comment · Show 6 · 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 Code_Helix · Mar 01, 2013 at 05:51 AM 0
Share

I tried the wildcards but it still didn't work. I'm using Github's git application so I am wondering if for reason that even if it's listed in the gitignore file it will still add it no matter what. Do you use Github's app or do you use something else?

avatar image Tarlius · Mar 01, 2013 at 05:59 AM 0
Share

I use Tower, but as far as I know they are all just wrappers for command-line git so I would think it makes no difference. If you made a commit before adding the .gitignore its possible you may have to manually remove them though.

You did "Library/" and not "/Library/", right? It might make a difference.

avatar image Code_Helix · Mar 01, 2013 at 06:02 AM 0
Share

Yes and I added the .gitignore file and commited before adding back the Library folder and the Github app still shows them for syncing.

avatar image Tarlius · Mar 01, 2013 at 06:06 AM 0
Share

Where is your .gitignore file?

And are you certain you didn't typo the name?

If not, I'm running out of ideas fast :(

avatar image Code_Helix · Mar 01, 2013 at 06:18 AM 0
Share

I have it in the root folder. I tried with TortoiseGit and it ignores the files so I am thinking that there might be something wrong with how gitignore files are read with the github app.

Thanks for helping me out as I guess I'll be using TortoiseGit for now. If you know of any better Git tool please let me know. Again thanks for your help.

Show more comments
avatar image
1

Answer by steakpinball · Mar 01, 2013 at 11:13 AM

Once a file has been committed to git any ignore rules which include it do not apply to it. Remove it from version control by committing deletion of the file.

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.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

A node in a childnode? 1 Answer

Imported Maya File mesh missing after Git sync 1 Answer

What is the best method for collaboration in very small teams (2-3 people)? 1 Answer

Addforce - bug with jump 2 Answers

Rename a project on the asset server? 3 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges