gitignore

Symfony3 and .gitignore

眉间皱痕 提交于 2021-02-10 12:19:11
问题 I've just tried cloning a Symfony3 project from github and realised it doesn't include /bin/ (as this was not required in Symfony2). I have now updated my .gitignore to take out the /bin/ and /build/ directories to avoid this happening in future. Are there any other modifications that I'm missing that we should be making to a 'standard' Symfony3 .gitignore file? My current content is as follows now: /app/config/parameters.yml /composer.phar /vendor/ /web/bundles/ /var/ !var/cache/.gitkeep

Symfony3 and .gitignore

情到浓时终转凉″ 提交于 2021-02-10 12:18:25
问题 I've just tried cloning a Symfony3 project from github and realised it doesn't include /bin/ (as this was not required in Symfony2). I have now updated my .gitignore to take out the /bin/ and /build/ directories to avoid this happening in future. Are there any other modifications that I'm missing that we should be making to a 'standard' Symfony3 .gitignore file? My current content is as follows now: /app/config/parameters.yml /composer.phar /vendor/ /web/bundles/ /var/ !var/cache/.gitkeep

What if I want to use files in gitignore

ε祈祈猫儿з 提交于 2021-02-08 05:45:43
问题 For sensitive data such as aws keys or password, I put them to files which is in .gitignore to make sure it is not committed to git. However, when keys are going to be used when scripts are running, what should I do? Manually add key content in a file before running? What if the program need to be triggered periodically by Jenkins? Can anyone help me with this? 回答1: Manually add key content in a file before running? That is the general idea: sensitive information should not be in a Git repo,

How to properly handle a file only used locally in git?

允我心安 提交于 2021-02-08 04:07:33
问题 I want to reorder the output of changed files in git commits so I've created a file called submodule/orderfile and configured diff.orderFile to point to that file. Now many problems arise If I add the file to .gitignore , the .gitignore will be listed as modified If I add the path submodule/orderfile to .git/info/exclude the file still appears when I run git status . Either way, orderfile or .gitignore will be listed in git status. If I commit it to a branch it'll be removed when I switch to

How can I highlight .gitignore code for my README.md?

只愿长相守 提交于 2021-02-05 11:14:36
问题 I wrote a README.md with parts of code and I want to highlight those parts with the right colors. One of this code is a .gitignore code , that I would like to integrate to my README.md . But I can't have the good linguist highlight for this, which colorize in green my comments for example. I have searched some languages detected by GFM but I am not satisfied by the results. Can someone help me to find the good linguist ? P.S. : I also want to question for a DockerFile, docker-compose in a

Override subdirectory gitignore's “must include” rule with local .git/info/exclude

谁都会走 提交于 2021-01-29 18:49:10
问题 Suppose I have the following git repository structure > tree -a . ├── .git │ ├── info │ │ └── exclude └── a ├── .gitignore ├── mustinclude.txt └── my-local-file-to-ignore.txt And the gitignore file says to always track txt files > cat a/.gitignore * !*.txt Is it possible to configure git so that it will ignore a/my-local-file-to-ignore.txt just for myself? The motivation for this is I want to include local scratch files (for testing or whatever) but I don't want other people using the

Is it possible to ignore a particular executable file using .gitignore?

大城市里の小女人 提交于 2020-12-26 03:59:21
问题 Suppose I get myProgam executable file on Mac as a result of compiling my code like this: gcc -o myProgram myProgram.c How can induce my .gitignore file to actually ignore the myProgram file? I'm not looking for the solution where I make a separate folder for my executable files. My question might seem obvious to many but I cannot actually find any solution online although I've searched a few pages and tutorials already as well as the StackOverflow resources. I'll be grateful for any hints.

Git is ignoring gitignore file under Windows 10

寵の児 提交于 2020-12-13 03:21:06
问题 Git is ignoring the folders in .gitignore file. Here is my .gitignore : (env is a folder generated by venv in Python ) #folders env/** pdfs/** # files #source files /timeformat.py /pdfreader.py I already did : git rm -r --cached . then git add . but it's adding all the files under env/Lib/site-packages What is the problem ? EDIT : here is my directory structure : 回答1: Change your gitignore from #folders env/** pdfs/** to: #folders env/* pdfs/* 回答2: The reason may be the .gitignore file and