W
W
WebDev2014-09-15 19:17:40
git
WebDev, 2014-09-15 19:17:40

How to add a file to .gitignore in laravel?

Hello, I use GIT when developing, there is not much experience yet, but there is a basis. I work in phpstorm and through its interface with git. To add a file to gitignore, I click on the desired file and select "add to gitignore" accordingly. A .gitognore file is created in the root of the site, in which the path to the desired file appears. After that, I commit and push, but the file is successfully uploaded to github. What am I doing wrong?
And the second question: How do you separate the local copy of the product from the working one? Here I have Laravel on my local, it has profilers, modules for debugging, etc. Do you just need to add all the files that have a connection to them in gitignor? This is inconvenient, there are a lot of files. What is the best way to organize work?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-09-15
Protko @Fesor

To get started, read this: ignoring . (In general, it is worth at least reading the basics).
Then this: link
More concisely. GIT should have all the files you need for development. If after git clone you cannot develop because there is not enough code, you have problems. There are "environments" on dev/prod to differentiate.

K
kompi, 2014-09-15
@kompi

You can use masks in gitignore.
After committing the changed gitignore, do not forget to clear the cache:git rm --cached

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question