crystal-bit / space-shooter

Shoot 'em up game, developed for the Hacktoberfest 2019 event with the Crystal Bit community.
GNU General Public License v3.0
41 stars 34 forks source link

Add *.import files to .gitignore #52

Closed basteez closed 5 years ago

basteez commented 5 years ago

*.import files need to be added to .gitignore, no need to version them

davcri commented 5 years ago

Hi @basteez thank you for creating this issue!

The official doc suggest to keep them: https://docs.godotengine.org/en/3.1/getting_started/workflow/assets/import_process.html#files-generated

I'm in favor of keeping these *.import files so that everyone who downloads the project uses the same settings (I want to keep this simple for beginners).

What do you think?

basteez commented 5 years ago

Hi @davcri,

I could agree with you, the problem is that after importing the project into godot (could it be any metadata in the files?), git marks those files as modified, even without touching anything.

davcri commented 5 years ago

I can't reproduce the issue :confused:

I tried this:

  1. clone the project
  2. open it with Godot 3.1
    1. Godot automatically reimports the assets into the .import folder (but these changes are ignored)
  3. Run the game and close it
  4. Check with git status

The only change is for the scene file, but it's not related to the assets: Screenshot_20191007_203523

basteez commented 5 years ago

That's strange because I did exactly the same.

Just tried to fork again the project and open again in Godot, "git status" result is this:

`PS D:\DEV\Godot\space-shooter> git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
        modified:   Assets/buttons/btn-clicked.png.import
        modified:   Assets/buttons/btn-hover.png.import
        modified:   Assets/buttons/btn.png.import
        modified:   Assets/gameplay_music.ogg.import
        modified:   Assets/warped city files/environment/background/buildings-bg.png.import        
        modified:   Assets/warped city files/environment/background/near-buildings-bg.png.import   
        modified:   Assets/warped city files/environment/background/skyline-a.png.import
        modified:   Assets/warped city files/environment/background/skyline-b.png.import
        modified:   Assets/warped city files/environment/props/antenna.png.import
        modified:   Assets/warped city files/environment/props/banner-arrow.png.import
        modified:   Assets/warped city files/environment/props/banner-big/banner-big-1.png.import  
        modified:   Assets/warped city files/environment/props/banner-big/banner-big-2.png.import  
        modified:   Assets/warped city files/environment/props/banner-big/banner-big-3.png.import  
        modified:   Assets/warped city files/environment/props/banner-big/banner-big-4.png.import  
        modified:   Assets/warped city files/environment/props/banner-coke/banner-coke-1.png.import
        modified:   Assets/warped city files/environment/props/banner-coke/banner-coke-2.png.import
        modified:   Assets/warped city files/environment/props/banner-coke/banner-coke-3.png.import
        modified:   Assets/warped city files/environment/props/banner-floor.png.import
        modified:   Assets/warped city files/environment/props/banner-neon/banner-neon-1.png.import
        modified:   Assets/warped city files/environment/props/banner-neon/banner-neon-2.png.import
        modified:   Assets/warped city files/environment/props/banner-neon/banner-neon-3.png.import
        modified:   Assets/warped city files/environment/props/banner-neon/banner-neon-4.png.import
        modified:   Assets/warped city files/environment/props/banner-open.png.import
        modified:   Assets/warped city files/environment/props/banner-scroll/banner-scroll-1.png.import
        modified:   Assets/warped city files/environment/props/banner-scroll/banner-scroll-2.png.import
        modified:   Assets/warped city files/environment/props/banner-scroll/banner-scroll-3.png.import
        modified:   Assets/warped city files/environment/props/banner-scroll/banner-scroll-4.png.import
        modified:   Assets/warped city files/environment/props/banner-side/banner-side-1.png.import
        modified:   Assets/warped city files/environment/props/banner-side/banner-side-2.png.import
        modified:   Assets/warped city files/environment/props/banner-side/banner-side-3.png.import
        modified:   Assets/warped city files/environment/props/banner-side/banner-side-4.png.import
        modified:   Assets/warped city files/environment/props/banner-small.png.import
        modified:   Assets/warped city files/environment/props/banner-sushi/banner-sushi-1.png.import
        modified:   Assets/warped city files/environment/props/banner-sushi/banner-sushi-2.png.import
        modified:   Assets/warped city files/environment/props/banner-sushi/banner-sushi-3.png.import
        modified:   Assets/warped city files/environment/props/banners.png.import
        modified:   Assets/warped city files/environment/props/control-box-1.png.import
        modified:   Assets/warped city files/sprites/misc/drone/drone-1.png.import
        modified:   Assets/warped city files/sprites/misc/drone/drone-2.png.import
        modified:   Assets/warped city files/sprites/misc/drone/drone-3.png.import
        modified:   Assets/warped city files/sprites/misc/drone/drone-4.png.import
        modified:   Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-1.png.import
        modified:   Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-2.png.import
        modified:   Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-3.png.import
        modified:   Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-4.png.import
        modified:   Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-5.png.import
        modified:   Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-6.png.import
        modified:   Assets/warped city files/sprites/misc/shot-hit/shot-hit-1.png.import
        modified:   Assets/warped city files/sprites/misc/shot-hit/shot-hit-2.png.import
        modified:   Assets/warped city files/sprites/misc/shot-hit/shot-hit-3.png.import
        modified:   Assets/warped city files/sprites/misc/shot/shot-1.png.import
        modified:   Assets/warped city files/sprites/misc/shot/shot-2.png.import
        modified:   Assets/warped city files/sprites/misc/shot/shot-3.png.import
        modified:   Assets/warped city files/sprites/misc/turret/turret-1.png.import
        modified:   Assets/warped city files/sprites/misc/turret/turret-2.png.import
        modified:   Assets/warped city files/sprites/misc/turret/turret-3.png.import
        modified:   Assets/warped city files/sprites/misc/turret/turret-4.png.import
        modified:   Assets/warped city files/sprites/misc/turret/turret-5.png.import
        modified:   Assets/warped city files/sprites/misc/turret/turret-6.png.import
        modified:   Assets/warped city files/sprites/sounds/beam.ogg.import
        modified:   Assets/warped city files/sprites/sounds/explosion.ogg.import
        modified:   Assets/warped city files/sprites/sounds/hurt.ogg.import
        modified:   Assets/warped city files/sprites/sounds/hurt.wav.import
        modified:   Assets/warped city files/sprites/sounds/sci_fi_platformer02.ogg.import
        modified:   Assets/warped city files/sprites/vehicles/spaceship-unit.png.import
        modified:   Assets/warped city files/sprites/vehicles/tank-unit.png.import
        modified:   Assets/warped city files/sprites/vehicles/v-police.png.import
        modified:   Assets/warped city files/sprites/vehicles/v-red.png.import
        modified:   Assets/warped city files/sprites/vehicles/v-truck.png.import
        modified:   Assets/warped city files/sprites/vehicles/v-yellow.png.import
        modified:   Music/Menu Theme.ogg.import
        modified:   icon.png.import
        modified:   project.godot
no changes added to commit (use "git add" and/or "git commit -a")`

Don't really know if it's a windows's git bug or whatever

davcri commented 5 years ago

This is pretty strange. What's the output of git diff? If it's too long, you can send a log file as well.

basteez commented 5 years ago

Guess I found the problem, it could be my git configuration with CRLF characters

warning: LF will be replaced by CRLF in Assets/buttons/btn-clicked.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/buttons/btn-hover.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/buttons/btn.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/gameplay_music.ogg.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/background/buildings-bg.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/background/near-buildings-bg.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/background/skyline-a.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/background/skyline-b.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/antenna.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-arrow.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-big/banner-big-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-big/banner-big-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-big/banner-big-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-big/banner-big-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-coke/banner-coke-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-coke/banner-coke-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-coke/banner-coke-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-floor.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-neon/banner-neon-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-neon/banner-neon-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-neon/banner-neon-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-neon/banner-neon-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-open.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-scroll/banner-scroll-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-scroll/banner-scroll-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-scroll/banner-scroll-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-scroll/banner-scroll-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-side/banner-side-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-side/banner-side-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-side/banner-side-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-side/banner-side-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-small.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-sushi/banner-sushi-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-sushi/banner-sushi-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banner-sushi/banner-sushi-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/banners.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/control-box-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/control-box-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/control-box-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/hotel-sign.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/monitorface/monitor-face-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/monitorface/monitor-face-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/monitorface/monitor-face-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/props/monitorface/monitor-face-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/environment/tileset.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/environment/bg-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/environment/bg-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/environment/bg-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/environment/tileset.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/drone/drone-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/drone/drone-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/drone/drone-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/drone/drone-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-5.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/enemy-explosion/enemy-explosion-6.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/shot-hit/shot-hit-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/shot-hit/shot-hit-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/shot-hit/shot-hit-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/shot/shot-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/shot/shot-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/shot/shot-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/turret/turret-1.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/turret/turret-2.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/turret/turret-3.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/turret/turret-4.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/turret/turret-5.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/misc/turret/turret-6.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/sounds/beam.ogg.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/sounds/explosion.ogg.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/sounds/hurt.ogg.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/sounds/hurt.wav.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/sounds/sci_fi_platformer02.ogg.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/vehicles/spaceship-unit.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/vehicles/tank-unit.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/vehicles/v-police.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/vehicles/v-red.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/vehicles/v-truck.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Assets/warped city files/sprites/vehicles/v-yellow.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in Music/Menu Theme.ogg.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in icon.png.import.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in project.godot.
The file will have its original line endings in your working directory
davcri commented 5 years ago

Nice we found the problem!

Probably git config core.autocrlf true will fix the issue. :crossed_fingers: https://stackoverflow.com/questions/5834014/lf-will-be-replaced-by-crlf-in-git-what-is-that-and-is-it-important

davcri commented 5 years ago

I'm gonna close this issue for now.