2

I've just started a unity project with one of my friends for some fun and decided to use git to collaborate. I created the project on my computer and pushed it. Everything seems to be working except for nothing from my assets folder (but the scene) is getting pushed to the repo when I commit. I've only created a couple sprites, but they obviously aren't shown in the repo. I followed this tutorial set up git, How to use Git for Unity source control? . The only difference should be a minor change to the gitignore, which can be found at the repo https://github.com/ThomasKearney/Maze_Flick .

1
  • This question can be reformulated as "Why Git ignores files, mentioned in .gitignore?". Commented Jun 5, 2015 at 18:55

1 Answer 1

1

This section makes Git literally ignore everything that was not tracked yet.

# Ignore everything
/*
/*/

So Git now only tracks files that were added before the second commit, which introduced a .gitignore file.

Use the .gitignore from the SO answer, mentioned above. It's a good one.

2
  • Thanks, not super new to git but obviously new to .gitignore
    – tommyhawk
    Commented Jun 5, 2015 at 19:23
  • There's a whole lot of useful links on the git-tag "about" page. Feel free to use them, especially the tutorials. stackoverflow.com/tags/git/info Commented Jun 5, 2015 at 19:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.