gitignore

gitignore loads other gitignores

痞子三分冷 提交于 2019-12-04 02:35:54
Is it possible? The git update-index --assume-unchanged is no solution, ignored files have to be tracked. Creating submodules either. E.g. cat .customgitignore(1|2|3...) i-do-not-need-this.extension cat .gitignore basic-stuff.extension <load> .customgitignore1 <load> .customgitignore2 <load> .customgitignore3 etc Issue description for those interested. I am creating private repo of configs. One branch = one config. Additional branch as workspace. I merge other branches-configs with workspace depending on requirements. Branches-configs each have their own .gitignore which should be applied only

Multiple Git repositories in one directory

偶尔善良 提交于 2019-12-04 00:48:53
问题 I would like to deploy a directory to multiple developers having different permissions. So this is one thing Git cannot do. What about creating two repositories in one directory and assigning them different file lists by excluding files managed by the other repository with the .gitignore file. Example: /www/project/.git for all files except in /www/project/css /www/project/css/.git -> only files in this directory Has anyone tried this solution? Or are there any better ways to handle this

Environment variables locally and Heroku

拥有回忆 提交于 2019-12-04 00:04:26
I have a sinatra app in which i have a yml file to set environment variables, i call them using this method module MyConfig def config environment = ENV["RACK_ENV"] || "development" YAML.load_file("./config/config.yml")[environment] end end so when i want to use a variable i do this for example aws_access_key_id = config['aws_access_key'] I have a .gitignore file that ignores config.yml when pushing to github for example.So when I push to heroku these environment variables will not be accessible? So this leaves me with using the heroku way of setting them like so heroku config:add aws_access

Android Studio Git .gitignore vs Project > Settings > Version Control > Ignored Files

烈酒焚心 提交于 2019-12-03 18:30:00
问题 I am somewhat confused, I noticed that upon setting up my first Git repository in Android Studio all of the correct files to ignore were automatically added to the Project's Settings under Settings > Version Control > Ignored Files. This appeared to be magic, I never told it what to ignore. Moreover, there is no .gitignore file in any directory of my project as I'm used to creating. This being said, I can't get my second project to automatically add ignored files, and really, I just want to

How can I accept all remote files in a specific folder during a git merge?

无人久伴 提交于 2019-12-03 18:17:31
问题 We're using posh-git on Windows Powershell for source control. We're in the unenviable position of storing some of our built assemblies in our git repo. I know all the sermons on why you shouldn't do that, but we have to live with it for now. Thankfully they are in a separate solution, but sometimes two people work on that solution in their own branch simultaneously, and the last one in gets to take the merge conflict. The process, of course, looks something like this: Person A lands their

Recursively include Nuget DLLs via Gitignore

纵饮孤独 提交于 2019-12-03 17:15:41
问题 I am using GIT with a new ASP.NET MVC project. I have a line in my gitignore file to ignore dlls *.dll I would like to add something along the lines of the following to include (i.e. do not ignore) DLLs in my NUGET packages folder !/packages/*.dll The problem I'm encountering is that not all nuget packages are created equally and, depending on the package in question, DLLs may be nested an arbitrary number of levels in the path hierarchy. It seems that I simply need a recursive solution along

.gitignore regex for emacs temporary files

大憨熊 提交于 2019-12-03 15:23:25
问题 I'm trying to .gitignore emacs temporary/autosave files. I'm using... \.\#.* in my .gitignore. But git add -A run in a subfolder is still giving me: # new file: .#make_collections.py # new file: .#norm_collections.py # new file: make_collections.py # new file: norm_collections.py even though \.\#.* is clearly getting the right file names and not the wrong ones when I test it with a regex tester. 回答1: You can also instruct emacs to save the autosave files in a different directory altogether by

Interconversion of gitignore and hgignore?

那年仲夏 提交于 2019-12-03 14:26:08
问题 I'm just starting to use hg-git to push some mercurial repositories to github, and I'm realizing that if people check them out using git, they'll need a .gitignore file in the repository. Is there any automated way to convert hgignore to gitignore or vice versa? 回答1: If you're just using glob syntax in your hgignore, then all you'd need to do is rename it, and it should just work. If you're using regex syntax then it's going to be a different story... 来源: https://stackoverflow.com/questions

git still shows files as untracked despite .gitignore and rm -r --cached. What did I do wrong?

南笙酒味 提交于 2019-12-03 13:58:19
I'm not sure what I'm doing wrong in this case with my .gitignore file, but these files keep showing up. Background I'm using Jekyll to build a blog. Jekyll generates _site and .sass-cache directories when it begins serving. I previously committed these directories before realizing I wanted to ignore them. To be overly cautious, I added all of the following lines to my .gitignore : ##Jekyll /_site/ _site/ _site /.sass-cache/ .sass-cache/ .sass-cache Since I knew I'd committed these files previously, I: Committed the updated .gitignore file. did a git rm -r --cached . deleted the _site and

Using Git to keep different versions of a file locally vs. in the master repository

假装没事ソ 提交于 2019-12-03 13:24:25
I have a PHP config file i'd like to manipulate locally but ignore those changes during git commits to my master repository. I had a .gitignore file which used to ignore this PHP file but bad things happen and now the config.php file is no longer being ignored and I can't remember how to re-ignore it. I know people on SO say to use git rm --cached <filename> but I can't for the life of me figure out how not to make git rm... keep deleting my config.php file. I'm wondering if someone can list how to ignore my config.php such that I can keep editing it locally but these changes don't get added