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) 94e2825] Added .gitignore. 1 […]
I am new to git but have spent a good deal of time reading through documentation and gotchas on git submodules before trying them. I am having a problem that I feel — probably naively — is a bug in git: I have a project, in that root directory I have a plugins folder, which […]
I’m having a problem with Visual Studio 2013 locking a .jfm file. I am unable to save project changes to the local git repository when the project is open. The error looks like this when clicking on the Commit button in the Team Explorer -> Changes panel: “An error occurred. Detailed message: Could not open […]
How do I ignore files in a specific directory, but not the directory itself, in Git? I can add a line to the .gitignore file, but it’ll ignore the entire directory. What sort of syntax does .gitignore support in order to achieve what I want?
I am running xampp on my windows machine. I have a load of git repos running locally on c:/xampp/htdocs and wish to add a global ignore to ignore the database config file which is in the applications/config folder of all these repos. I’ve created .gitignore_global in the htdocs folder and run git config –global core.excludesfile […]
I have followings in the .gitignore file application/config/database.php application/config/config.php But when I run git status both files are under modified. Isn’t that git should ignore these files? How should I do so that these files won’t be displayed. Thanks in advance.
I’m sure this title is fairly obscure. I’m wondering if there is some way in git to tell it that you want a certain file to use different versions of a file when moving between branches, but to overall be .gitignored from the repository. Here’s my scenario: I’ve got a Flash Builder project (for a […]
I am trying to use a .gitignore file to ignore a top level /assets directory, so my file says: assets/ This is working – however other folders at lower levels of my app are also getting ignores – any folder called assets is being ignored. eg. /style/img/assets. So how to I specify I only want […]
I have a branch that contains a folder resources/ that is in the .gitignore. However, within this folder are a few files that are managed by git. (We use this for 3rdparty-libraries that we compile ourself and want to have the sources in our git) Now we merged this branch back to the master (git […]
I want to revert a file in Git to a previous commit. The file is ignored by my .gitignore file. In my most recent commit, I accidentally forced it in. This question answers how to revert any specific file: Reset or revert a specific file to a specific revision using Git? Running: git checkout 234234234b234234234c123424 […]