gitignore

Committed folders pushed to heroku don't make it

走远了吗. 提交于 2019-12-08 05:29:02
问题 I'm having a weird issue when pushing my app to heroku. It's an angularjs front app with a basic nodejs server to be able to run it on heroku. I'm pushing a deployment branch with all the app already "compile" by grunt in a /dist folder My problem is in the /dist/public directory, I have 4 folders : js , css , img and fonts ; but after a push and checking on the dyno with heroku run bash , only the img one is in /dist/public , the 3 others aren't there. I try to do a new push, renaming the

git ignore exception not working multiple subdirectories below ignored directory

我的梦境 提交于 2019-12-08 04:24:20
问题 I am having an issue where the exception syntax for gitignore (!fileName.txt) is not working when the file is multiple subdirectories below the ignored directory. For instance: web/[Ee]xample.[Ww]eb/[Ss]itecore/* !web/[Ee]xample.[Ww]eb/[Ss]itecore/[Ss]hell/[Tt]hemes/[Ss]tandard/[Cc]ustom/32x32* does not include the files in the folder 32x32. I have to manually add them via command line like so: git add -f -r web/[Ee]xample.[Ww]eb/[Ss]itecore/[Ss]hell/[Tt]hemes/[Ss]tandard/[Cc]ustom/32x32 Is

Ignoring everything in .gitignore and adding subfolder does not work

放肆的年华 提交于 2019-12-08 04:23:53
问题 I have the following .gitignore: # Ignore everything /* !/.gitignore # Readd folders: #!/mainfolder/ # this works! !/mainfolder/subfolder/ !/mainfolder/subfolder/* I want to ignore everything, but subfolder/ . Adding the line !/mainfolder/ works, so that /mainfolder is not ignored anymore. But I want to add only the things below subfolder/ and the second and third lines for subfolder/ do not work. I have found several links online suggesting this is the correct way (e.g. this one). So what am

gitignore all folders under any folder

六眼飞鱼酱① 提交于 2019-12-08 04:16:14
问题 I have this structure: versions ├── library-3.1 │ ├── Dockerfile │ ├── options │ └── armhf │ ├── Dockerfile │ └── rootfs.tar.xz ├── library-3.6 │ ├── Dockerfile │ ├── options │ └── x86_64 │ ├── Dockerfile │ └── rootfs.tar.xz ... I want git to ignore any folder under versions/**/ (like versions/**/armhf and versions/**/x86_64 ), but keep tracking the files options and Dockerfile Any ideas? Thanks! 回答1: # Ignore everything under 'versions/'... versions/* # ...except 'options' and 'Dockerfile'

Best way to add sub module ignored content

丶灬走出姿态 提交于 2019-12-08 04:16:08
问题 I'm using a repository (B) as a submodule of my project (A). In that repo (B), there is an ingored directory, dedicated to local config files for that project. I'd like to version the content of that directory from my own project (A). Since those files are gitignored from (B), I thought I could simply git-add them but I get fatal: Pathspec 'oh-my-zsh/custom' is in submodule 'oh-my-zsh' . What is the best way to do that (I'd rather not change anyting in (B))? 回答1: I'd suggest using a symlink

git check-ignore */** not listing folders

戏子无情 提交于 2019-12-08 03:52:56
问题 This question was changed, since the error description was wrong! Thanks to help from @Tim and @Jubobs I have entire folders in my .gitignore file, but when I use git check-ignore */** When they are deeper in the folder structure, they are not showing up. Is there a way around this? example folder structure: repo: repo/.git repo/.gitignore repo/hello/__world/test.txt In .gitignore: **/__world/** When I now call git check-ignore */** in the root directory nothing will show up, when I cd into

Git: .gitignore in subdirectories

大兔子大兔子 提交于 2019-12-08 03:45:16
问题 I'm trying to manage my neovim 's init.vim with git. I want to ignore everything except the init.vim in the same folder as the .gitignore and one kalisi.vim in the directory /bundle/vim-airline/autoload/airline/themes/ This is my current .gitignore : # Ignore everything * # Exceptions !.gitinore !init.vim !bundle bundle/* !bundle/vim-airline bundle/vim-airline/* !bundle/vim-airline/autoload bundle/vim-airline/autoload/* !bundle/vim-airline/autoload/airline bundle/vim-airline/autoload/airline/

How do I deploy to heroku from git when my API key is in a .gitignore file?

感情迁移 提交于 2019-12-08 03:30:25
问题 I have my API key set to a variable in an apikey.js file, and I reference the variable in another javascript file where the API key is supposed to be. I added apikey.js to .gitignore so that people wouldn't see it when I pushed it to my (public) github account. However, when I try to deploy, the app doesn't work because of the .gitignore. How can I continue to push up files omitting the API key to my repo on git while deploying on heroku? 回答1: use https://github.com/ddollar/heroku-config, and

How to know which part of .gitignore that is actually responsible for ignoring some file?

血红的双手。 提交于 2019-12-08 02:45:39
问题 Say I have .gitignore : x64/ x86/ bin/ obj/ FileA FileB FileC etc.. Now when I build, all build files that I want to ignore, are actually being ignored. However, the build fails for a missing file (Call it FileX). When I add FileX to the project, it builds fine with no errors. However, GIT does not see that I added that file, and when I do git status --ignored , I see the file under untracked files . I tried the solution in undo git assume unchanged with no success. Why this file is being

.gitignore and node_modules

∥☆過路亽.° 提交于 2019-12-08 01:45:14
问题 I am trying to figure out the best way to handle node_modules in git. From what I read, there are two options: A. Keep all the node_modules in the git repository, together with my project. This way, a person cloning my project does not have to install any modules. B. Don't keep any node_modules in the git repository, i.e., have a ".gitignore" file that contains "node_modules". However, in some projects, I don't see any of these two options. For example, in this node.js project, there are no