gitignore

filtering of files and paths from gitignore

天涯浪子 提交于 2019-12-01 22:40:29
问题 I would like to find all file paths that are not filtered by a .gitignore (or any nested .gitignore files within sub-directories) using C#. This is similar to the question here with regard to PHP. I'm wondering if someone knows if this code had already been made available (in C#) somewhere online. UPDATE: To answer what I want this for, it is so I can run my own little periodic backup of my source files for certain projects (zipping the result), for added peace of mind. The hard part is

How can I tell Git to use a different gitignore file than “.gitignore”?

白昼怎懂夜的黑 提交于 2019-12-01 20:27:17
I can tell Git where the Git repository is with --git-dir . I can tell Git where the working tree is with --work-tree . How do I tell Git where the gitignore file is? Q. Why would I want to do such a thing? A. For some working trees I have two different Git repositories. One is in the standard location of .git . This repository I use for normal version control. The other respository is in .git.sync . This repository I use for periodic automatic syncing between computers. I.e., it's my own little Dropbox clone implemented with Git and a little script that runs periodically. Ideally, I would be

Git: How to remove files that are now in gitignore but were added to repo before

纵饮孤独 提交于 2019-12-01 19:27:35
I have a couple of files that are in the repo and also in .gitignore. I would like these files to be removed from the repo but not be deleted from my production server when I do git pull origin master I have tried multiple solutions but none seam to work, in each one I end up deleting the files from the server when I do a pull. References: How to make Git "forget" about a file that was tracked but is now in .gitignore? Remove directory from remote repository after adding them to .gitignore How to remove files that are listed in the .gitignore but still on the repository? You need git filter

What grails project files should not be added to version control? (Grails 1.3.x)

夙愿已清 提交于 2019-12-01 19:14:23
(This question has been asked before, but a while back: Suggestions for Grails .gitignore ; it was answered for grails 1.0.x) What files in a Grails 1.3.x project should not be included in version control? See http://grails.org/Checking+Projects+into+SVN - it has a short list of ignores. I would include .settings/ but I tend to keep .classpath and .project in source control because they change with the project. Then again, perhaps it's better simply to run grails integrate-with --eclipse . .gitignore: # Maven output directory target/ # Eclipse Project files .classpath .project .settings/ # OS

Git: How to remove files that are now in gitignore but were added to repo before

无人久伴 提交于 2019-12-01 17:44:30
问题 I have a couple of files that are in the repo and also in .gitignore. I would like these files to be removed from the repo but not be deleted from my production server when I do git pull origin master I have tried multiple solutions but none seam to work, in each one I end up deleting the files from the server when I do a pull. References: How to make Git "forget" about a file that was tracked but is now in .gitignore? Remove directory from remote repository after adding them to .gitignore

How to Git Ignore These Files

谁说我不能喝 提交于 2019-12-01 16:41:25
问题 I'm having a little trouble figuring out how to ignore all of these files that are created w/ Solr/Sunspot. Basically I want to ignore everything inside of solr/data which includes a lot of folders, subfolders, and files. 回答1: Just add /solr/data to your .gitignore . Assumed directory layout: .git .gitignore solr/data/ other/ folders/ README.txt ... 回答2: You should be able to do /solr/data or put a .gitignore file inside solr/data and just put * . Note that you can't ignore things that have

Git ignoring all minified suffixed files

Deadly 提交于 2019-12-01 15:09:11
问题 I currently have something like: javascripts/ plugin.js plugin.min.js stylesheets/ style.css style.min.css How would I get all .gitignore to ignore all minified ( .min ) files? Would something like **/*.min.* work? 回答1: You have several solutions, depending of what you really need. Ignore all minified files in your project : *.min.* Ignore all minified files in a folder : assets/*.min.* Ignore only JS/CSS minified files in your project : *.min.js *.min.css 回答2: just having this in the

Is it possible to stop tracking local changes to a file that you *do* want to be pulled down if changed in the repo?

时光毁灭记忆、已成空白 提交于 2019-12-01 09:36:18
We have a config file in the repo which all the users contribute to based on their function. For my local testing, I need to manually change two values in that config file, but I never want my changes committed back to the server. I do however want to pull updates to the file if there's a newer version in the repo, even if that means my local changes will be overwritten. That's fine, I can just make them again from a stash I created specifically to do exactly that. What I'm wondering is if I can tell Git "Hey... I will never push back my local changes to the server, so don't show it to me as

Git Including an arbitrarily nested subfolder when its parent has been excluded in .gitignore

ぐ巨炮叔叔 提交于 2019-12-01 08:33:16
问题 I'm excluding a folder a and its subfolders, but want to have a specific subfolder b included, where b can be a subfolder somewhere below a, and the exact path to b has not been specified. My .gitignore contains these lines: a/** !a/**/b however this does not work. Have tried numerous other permutations of the above, including from other posts on stack overflow, but nothing appears to work. The previous question on stackoverflow deals with the situation where you can explicitly declare the

Git: How to ignore changes to a tracked file?

别等时光非礼了梦想. 提交于 2019-12-01 07:39:33
问题 I have a file with database settings in my project which I have set to some defaults. The file is tracked by Git and checked in. Since this file will be edited with different values various developer machines, is there a way I can tell Git to ignore new changes to this file? I tried adding the file to the .gitignore file, but since the file is tracked it isn't ignored. This is alright and good in other situations, but I am wondering if there is something I can do here? 回答1: I recommend naming