gitignore

Managing a framework with Git, ignoring changes to given files after first pull

I'm using git to manage an extended CodeIgniter Framework. It's a clone of the current CI release with extra helpers, libraries ect. I have many sites all using this framework and if I add a new helper method or fix a bug in one site I want to be able to easily update all the other sites without overwriting any of their custom files. I...

git ignore exception

I have a gitignore file that makes git ignore *.dll files, and that is actually the behavior I want. However, if I want an exception ( i.e. to be able to commit foo.dll), how can I achieve this? ...

Github and Non-Ignoring files in the .gitignore

I had a file I needed to edit in my .gitignore file. I edited .gitignore, committed it, and still my file was unavailable to commit. I deleted the file, readded it, and once it has the same name, its still unavailable to commit. I tried -f, which then added an empty version of the file to my repository. And the worst apart about that ...

How do I open source my Rails' apps without giving away the app's secret keys and credentials.

I have a number of Rails apps hosted on GitHub. They are all currently private, and I often will deploy them from their GitHub repository. I'd like to be able to make some of them open source, just like the ones you can find on http://opensourcerails.com. My question is: How can I make these repositories public without giving away super...

How do you gitignore everything except a directory?

I am trying to sync my desktop and laptop using a cron'd git. It works beautifully on a single directory. However I want to sync multiple config files scattered about and some other things. To do this decided to turn my home folder into a git directory and ignore everything except for a few select files and directories. $ cat .gitignore...

git: can i commit a file and ignore the content changes?

every developer on my team has their own local configuration. that configuration information is stored in a file called "devtargets.rb" which is used in our rake build tasks. i don't want developers to clobber each other's devtargets file, though. my first thought was to put that file in the .gitignore list so that it is not committed ...

Protecting files in git repository

I have a central repository with a subset of files that I want to protect from been changed (by pushing) from another users. If I add this files to .gitignore they would not be cloned. Is it possible to give the ability to clone all files, but after cloning add some of them to .gitignore on the client side? ...

Ignoring a directory chain in git?

I need to ignore the following. In paths like /a/b/c/d/e/f/g, I need to ignore /d/e/f/g. I also need to be able to ignore every place /d/e/f/g appears beneath a. I tried d/e/f/g, but that did not work. Thoughts? ...

Git dealing with large amounts of files which shouldn't be checked into svn.

I'm using git behind svn, and for each branch I have, I need to do a full build (which takes a few minutes). These build files should NOT be checked in, but they are intermingled with user-modified files, which means I cannot just exclude the directory. The user-modified files are likely to change, also, which means I can't make special ...

Git : ignore symbolic links

Is it possible to tell Git to ignore symlinks ? I'm working with a mixed Linux / Windows environment and, as you know, symlinks are handled very differently between the two. ...

How to forbid git commit if there are untracked files?

Sometimes, it makes sense to forbid git commit when there are untracked files, because you should add them either to files to commit or gitignore. And an option like -f to force this commit is also necessary. So is there any option/plugin/etc to do that? Thank you very much. ...

Limit depth of .gitignore

For various reasons, I have the entry in my .gitignore in the root of a project: *.c As I desire, this ignores all C files from being included. However, I really only want the C files to only be ignored in the root directory, and not all the sub-directories: foo.c bar.c folder/baz.c In the above scheme, I only want foo.c and b...

Vanishing file included in .gitignore

this is probably naive question: i have file config.yml which is in .gitignore file when I'm switching branch to 'someotherbranch' and next i switch back to master then I don't see config.yml why ignored files are vanishing after switching branch and what can I do to avoid it? ...

How to exclude file only from root folder in GIT

I am aware of using .gitignore file to exclude some files being added, but i have several "config.php" files in source tree and I need to exclude only one, located in the root while other keep under revision control. What I should write into .gitignore to make this happen? ...

git ignore for directories with spaces on Mac OS X

I'm trying to add some patterns to my .gitignore file to ignore *.mode1v3 and *.pbxuser files generated by Xcode. However, my app name has a space in it, so the files I want to ignore are in the Foo Bar.xcodeproj/ directory. Adding variants of these patterns don't seem to work: *.mode1v3 Foo Bar.xcodeproj/ Foo Bar.xcodeproj/*.mode1v3 Fo...

Recommended .gitignore file for Python projects?

I'm trying to collect some of my default settings, and one thing I realized I don't have a standard for is .gitignore files. There's a great thread showing a good .gitignore for Visual Studio projects, but I don't see many recommendations for Python and related tools (PyGTK, Django). So far, I have... *.pyc *.pyo ...for the compiled ...

git clean -X behaviour when .gitignore has sub-directory entries

When using sub-directory entries in .gitignore, "git clean -X" doesn't clean the ignored sub-directory. $ git init test Initialized empty Git repository in /home/jpgariep/git/test/.git/ $ cd test/ $ mkdir -p a/b/c $ touch a/b/c/test $ echo '/a/b/' > .gitignore $ git add .gitignore $ git commit -m "Added .gitignore." [master (root-commit...

Creating directory/file name rules for .gitignore

I'd like to set up some rules in my .gitignore whereby any directory or file with a name containing "_nogit" will be ignored. Examples: ../videos_nogit/... bigvideo_nogit.mp4 assets/_nogit/bigvideos... Thanks-- ...

How do I .gitignore and delete an already commited file without affecting other working copies?

I have a bare repository and two working copies - one on my machine, the other on the server. It turned out that I have to .gitignore a certain file that has to be specific for every machine. Let's call it 'settings.py'. This file is already commited. I did put 'settings.py' in .gitignore to ignore it. When I now change the file on my m...

Removing a file from git index also removes the file from server

I have a file named "myfile.php" on my server and in my computer. I want to remove myfile.php from git index in order to prevent changing myfile.php in server.I do this by adding the file to .gitignore and removing the file from index with "git rm --chached myfile.php" Now when I run "git pull" it removes the file itself from working dir...