Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vertoo's avatar

Elixir version and deploy files

I'm using version in elixir gulp tasks and Forge to deploy. Because version make always new files (and delete old) these files must be added on commit. Usually I commit from PhpStorm GUI, not from command line and usually I forget to manually add new build files to repository.

Is any solution to automate this? Maybe I do this wrong way? Eventually I can use command line, but GUI is quicker (one shortcut and I have window to write commit message and button Commit & Push).

0 likes
5 replies
ejdelmonico's avatar

Well for me, I use gitignore for files I don't want to commit. Then I run git add . git commit -am git push Use git status to see if build directory is included.

1 like
vertoo's avatar

I use .gitignore too. I think terminal is only one solution for this.

spekkionu's avatar

You can add the build directory to .gitignore and compile on the live server as part of your deployment script.
I don't really like running that kind of stuff on the live server though as I don't have a huge amount of faith in npm not breaking things.

You could setup git hooks to compile the assets whenever you push but that would be a big pain to get working and probably not worth it.

I guess maybe just do better at remembering to commit changes?

1 like
bobbybouwmann's avatar
Level 88

You say you're using PhpStorm. If you create a new project and the project contains a git directory PhpStorm will ask you if any new created file needs to be added to tracking for git. You then get two options (Yes or No). There is also a checkbox that says, don't ask again.

If you just press yes and say don't ask again all files will be added automatically. Just remember to update your .gitignore file with the files you don't want :D

vertoo's avatar

You have right. Best idea is git add . and up to date .gitignore. Hooks, compile on live server - never. I must change my workflow with commit changes and use terminal for this job.

Thanks.

Please or to participate in this conversation.