gitignore

Why is SymfonyRequirements.php excluded from .gitignore?

╄→гoц情女王★ 提交于 2019-12-07 15:20:23
问题 If I understand it correctly, the SymfonyRequirements.php file (which lives under /app or /var depending on Symfony version) is handled by Composer. I therefore suppose it should be not be tracked by any version control system. However, I see it is excluded from Symfony Standard Edition's .gitignore file: /var/* [...] !var/SymfonyRequirements.php Edit Symfony core developer @Stof says in a Github issue: given that one of the checks is whether you installed vendors, it must be there before

Does git update-index --skip-worktree affect the upstream repo?

岁酱吖の 提交于 2019-12-07 10:18:38
问题 I've been working with git for a while myself, and am now setting up a repo for our team. We develop a eCommerce platform. There are a few directories and files to be ignored, such as the upload directory and environment specific config files. While the config files are on .gitignore, I'd like to ignore the uploads directory with either --skip-worktree or --assume-unchanged . My question - which I couldn't find an explicit answer on - is if the --assume-unchanged or --skip-worktree bit will

.gitignore is whitespace sensitive?

别来无恙 提交于 2019-12-07 07:05:28
问题 My .gitignore file seems to be working unpredictably. Here is an example: I make a new repo foo with a file bar.txt, which I want to ignore: pon2@kann4:~$ mkdir foo pon2@kann4:~$ cd foo/ pon2@kann4:~/foo$ touch bar.txt pon2@kann4:~/foo$ git init Initialized empty Git repository in /home/pon2/foo/.git/ pon2@kann4:~/foo$ git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # bar.txt nothing added to commit but

How to I switch to a git branch that ignores files without deleting these files?

爷,独闯天下 提交于 2019-12-07 06:52:00
问题 I have branch master that ignores .idea in its .gitignore . From that, I created branch noIgnore that has no .gitignore . I found that checkout master deletes .idea . That's not the behavior I want. I want to keep .idea , just not track it, not on master . How do I do that? 回答1: You could stop tracking changes for a file in repo git update-index --skip-worktree .idea Since you're tracking it in the other branch, then when you make changes you'll want to start tracking changes again git update

Git ignore changes to committed file

最后都变了- 提交于 2019-12-07 06:46:16
问题 I have a config file in my repo that shouldn't get changes committed to it. The problem is that, when I make changes to the file they are picked up by git status. I've tried various ways to ignore changes to it. How can it be automatically ignored when I clone the repo, so that any changes I make to the file shouldn't be picked up by git? Solutions I've tried: Adding the file to .gitignore . Doesn't seem to work. Is this because the file is already on the index? Using git update-index -

Git clean inside ignored folders

柔情痞子 提交于 2019-12-07 04:37:58
问题 I have a folder foo that is included in gitignore: - .gitignore (this contains 'foo') - foo * *** bar When I run git clean -f or git clean -f -x , this does not delete bar (bar is a normal file). Is there a way to tell git to clean inside ignored folders? 回答1: git clean -fdx will delete all untracked files, including directories. The -d is necessary to cause the cleaner to descend into the untracked dir. 来源: https://stackoverflow.com/questions/9314190/git-clean-inside-ignored-folders

Possible implications of of adding *.sdf files to .gitignore

丶灬走出姿态 提交于 2019-12-07 01:09:23
问题 I recently pushed a Visual Studio C++ project to github. I've noticed that VS creates a .sdf file that's relatively large (~25MB). I tried deleting this file in my workspace to see whether or VS would throw an error. Upon open the project in VS no errors where reported and it the file was recreated. I'm considering, therefore, removing the .sdf file that's currently in my repository and adding an *.sdf entry to the repo's .gitignore file. The consequence of this is that when a user pulls the

How can I write a rule in gitignore to ignore all files except directories in some directory?

邮差的信 提交于 2019-12-06 23:53:56
问题 So lets say I have a directory structure like so uploads/ --dir1/ ----one.txt ----two.txt ----dir2/ ------one.txt ------two.txt I would like any directory and sub directories of uploads to be tracked but not any files in it with the exception of a dummy file because git doesn't track directories. I would think something like this would work but it doesn't. * !.gitignore 回答1: When you tell it to ignore * , Git will not recurse into any subdirectories (even though you have a “unignore” pattern

Uploading Specific Vendor files with Laravel's Envoyer

本小妞迷上赌 提交于 2019-12-06 23:22:25
问题 I'm trying to upload only specific vendor files to my server using Laravel Forge. The reason is because I've edited the code in some of my dependencies, whats happening now is that certain features of my site are breaking because when I push from Envoyer to my server , Envoyer is grabbing from my GitHub repo. my GitHub repo doesn't contain a vendor directory, as it shouldn't because Iv'e added that directory to my gitignore file /vendor/* /node_modules Homestead.yaml Homestead.json .env I've

Change default gitignore file when creating a new project

微笑、不失礼 提交于 2019-12-06 23:18:57
问题 Is there a way to change the default file .gitignore that Android Studio creates when creating a new android project? I searched for it in the Settings but could not find anything. 回答1: Unfortunately, there is no way to do that automatically, besides the one Ted has mentioned. However, personally, I don't see this as a big downside, because you can thus safely add your specific templates that fit best to your project. To be able to do this, do the following: Go to File -> Settings and from