Answer the question
In order to leave comments, you need to log in
How to properly set up Git for Laravel?
Hello.
Now I'm learning about Git and Laravel at the same time :) git status constantly displays me:
Untracked files:
(use "git add <file>..." to include in what will be committed)
.editorconfig
.env.example
.gitattributes
.gitignore
git add *
, then these files are added to the index, and I'm not sure if they should be there. Answer the question
In order to leave comments, you need to log in
Yes, you need to set up gitignore. .
env.examle can be in the repository,
.gitignore is also needed,
.editorconfig is needed in the repo (universal settings for IDEs and code editors ),
.gitattributes in the repo.
First, gitignor is configured, then the remaining files that are not ignored are added to the git.
At the same time, if you are working in phpStorm, you will have an .idea folder in your project, which should be added to gitignor, because these are the settings of a specific IDE that only you need.
Everything is fine, thanks to the configured .gitignore, these files should be included when git add . git adds all files, but not hidden ones (they start with a dot). Therefore, this is how it works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question