gitignore

Interconversion of gitignore and hgignore?

一曲冷凌霜 提交于 2019-12-03 04:15:07
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? 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/4349043/interconversion-of-gitignore-and-hgignore

Configure git to track only one file extension

▼魔方 西西 提交于 2019-12-03 03:44:08
问题 I have one directory tree with many kind of different files. There are 300 directories on the parent directory. Each directory could have other sub directories. I only want to track *.cocci on all sub directories. Here is my .gitignore: * !*.cocci But it do not work, as the files on sub directories are not tracked. How can I tell git that I only want to track *.cocci on all sub directories? 回答1: Read this question. You want: # Blacklist everything * # Whitelist all directories !*/ # Whitelist

Git ignore .git folder

落爺英雄遲暮 提交于 2019-12-03 03:36:09
I have a php project that uses composer for package management. One of the packages is another project belonging to the same repo. I have a need to commit my entire vendor folder, but I want to ignore the .git folder in the sub-project so that it doesn't get treated like a submodule. So far I have had no success. Things I've already tried: vendor/.git vendor/**/.git/ google search stack overflow search Here's what the sub-project folder looks like in GitLab. Instead of the files, it's just some kind of reference. You can use git hooks to achieve what you want. Thinking out of the box, you

git excludes vs ignores

孤街醉人 提交于 2019-12-03 03:34:17
问题 I use Tower for using Git in Mac. The settings in Tower has Ignores section which creates the .gitignore, but it has another section named "Excludes". And it seems like that one can use excludes with "# git ls-files --others --exclude-from=.git/info/exclude". What Excludes is for? Why one needs excludes when gitignore is available? 回答1: It's a list of files that are not in .gitignore (which can be versioned), but which you want to exclude on your machine's copy of the repo. From the docs:

.gitignore and Visual Studio project: Ignore bin/Debug directory but not bin/Release directory

六月ゝ 毕业季﹏ 提交于 2019-12-03 02:57:32
问题 I have a C# Visual Studio project in a git repository. I want to ignore the contents bin/Debug directory but not the contents of the bin/Release ' directory. I've added bin/Debug to my .gitignore file, but it doesn't seem to work - it is including the entire contents of the bin directory. What would the correct entry be to do this? 回答1: You shouldn't have to delete anything. After you added the .gitignore file, run this command to clear the cache, then stage and commit again: git rm -r . -

What should I put in a meteor .gitignore file?

纵然是瞬间 提交于 2019-12-03 02:29:13
问题 I have a new meteor project. I'm guessing the .meteor dir has a combination of configuration files (needed) and temporary files (not needed). So what's in your .gitignore ? 回答1: The only directory you want excluded from version control is .meteor/local . Meteor automatically creates the right .meteor and .meteor/.gitignore , though -- you shouldn't need to do anything. 回答2: You might want to put any configuration settings files in there if you are pushing to a public repos. I store any

Why is .gitignore not ignoring my files?

时光总嘲笑我的痴心妄想 提交于 2019-12-03 02:11:47
问题 See the image below. My .gitignore file should be ignoring all files in src/dist, but isn't. 回答1: .gitignore only ignores files that are not part of the repository yet. If you already git add ed some files, their changes will still be tracked. To remove those files from your repository (but not from your file system) use git rm --cached on them. 回答2: The .gitignore file ensures that files not tracked by Git remain untracked. Just adding folders/files to a .gitignore file will not untrack them

Why doesn't my global .gitignore file ignore?

一笑奈何 提交于 2019-12-03 01:55:15
问题 $ cat ~/.gitconfig [core] editor = vim excludefiles = /home/augustin/.gitignore $ cat ~/.gitignore toto $ mkdir git_test $ cd git_test/ $ git init $ touch toto $ git status # On branch master # # Initial commit # # Untracked files: # (use "git add <file>..." to include in what will be committed) # # toto nothing added to commit but untracked files present (use "git add" to track) $ git --version git version 1.6.3.3 Why isn't toto being ignored? Other settings in ~/.gitconfig are taken into

.gitignore is not ignoring directories

大兔子大兔子 提交于 2019-12-03 01:43:37
问题 What I did: I think there were some weird configurations from the github gui that caused this issue and prevented me from being able to easily use git from command line or even git-bash. I ended up just uninstalling github and git then reinstalling just git for windows. I now have everything running off the command line(except ssh which I run from git-bash). Much easier and more reliable that the github gui. Thanks to mu 無 for taking the time to try to figure this out. I didn't end up using

Cordova 5.0.0: Which files should I commit to git?

浪子不回头ぞ 提交于 2019-12-03 00:58:29
问题 I use Cordova 5.0.0 and i have the following project structure: MyProject - hooks - platforms - plugins - resources - www - config.xml My question now is: Which of these folders can I omit? I ask it because I work on three different platforms. I Develop on linux for android, windows for windows phone and on mac for ios. If I commit the whole project I always get warnings and error for the not supported platforms. What I want is a minimalistic git repository. One problem for example are the