FAQ Database Discussion Community


Ignored files from .gitignore is different on each developers computer

git,version-control,gitignore
I've followed the steps here to remove all my files from git tracking and then added them back to be tracked. After running git status --ignored I could now see the files being ignored, which was what I was trying to fix. Originally, there were several files not being ignored....

.gitignore for all except Jenkins job config files

git,jenkins,gitignore
I'm using this .gitignore in the Jenkins directory: #Ignore everything * #Don't ignore directories !*/ #Don't ignore these files !/.gitignore !jobs/*/config.xml !jobs/**/modules**/config.xml But .gitignore files in subfolders aren't ignored. I want to except only the root .gitignore....

Git ignore is not ignoring the netbeans private files

git,netbeans,gitignore
When ever I do git status, the netbeans private.xml is making trouble, I tried adding that in git ignore several ways. but the gitignore simply does not ignore it. git status On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to...

How to get git to ignore directory on my server?

git,github,gitignore
Let's say my repo looks like this: myApp public index.html ... tests foo.js ... I want the tests folder to get pushed to GitHub but NOT to my server. How do I accomplish this? Since I want tests/ to get pushed to GitHub I cannot simply add /tests/* to my...

Git ignoring a file but not ones with names

git,gitignore
In my .gitignore file I want to ignore a file just called .env but not files that have something.env: I have tried this: .env !*.env But it does not work...

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

android,git,repository,gitignore
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...

Global .gitignore within vagrant

vagrant,ubuntu-14.04,gitignore
Steps below work fine when I want to ignore a file globally in Linux however when I SSH into vagrant and run git status I can still see .idea/ as "Untracked". What should I do in order to help vagrant picking up these global settings? I placed .idea/ in .gitignore...

Unwatch all files that start with certain text in file name/title

git,gitignore
I'm trying to unwatch all files in my Git repository whose file names start with 'form.' For example: 'form1.cfm, form2.cfm, form3.cfm,' which are all throughout my repository in several different levels of directories. This following command has worked for unwatching entire directories, but it's not working in what I'm doing...

How to work with meteor, git and different dev platforms?

git,meteor,gitignore
I am on Windows; another developper is on linux. My release and versions files are not the same as his. With Git, how can we do development on the same project but on different platforms? What is the strategy? Do we keep local versions of "release" and "versions" and ignore...

.gitignore exclude specific file

git,gitignore
I am trying to use .gitignore file to exclude templates.js located in public/app/ folder. My .gitignore file looks like this: /vendor /node_modules composer.phar composer.lock .DS_Store templates.js But when I check in the Git Gui, the templates.js file is still show in it. How can I specifically exclude a file using...

How to set Git to ignore the word “xdebug_break()” for all project files?

git,xdebug,gitignore
I use NetBeans as editor and Xdebug as PHP debug tool. Is there a way to make Git to ignore all "xdebug_break()" words? I am using windows 7.

Including specific file extension in gitignore

git,gitignore
I want to include all the *.meta files in the Assets directory and all subdirectories while excluding everything else in Assets I tried /Assets/* !/Assets/**/*.meta !*.meta but that only include *.meta within /Assets ???? Thanks for any help...

Git keeps adding files to repository than should be ignored

git,android-studio,gitignore
I'm working in Android Studio and I don't know if this problem is related to Android Studio or git: I want to keep the .iml files that are created by Android Studio out of my git repository so I put them in a gitignore file which you can see in...

.gitignore to retain one file

git,jenkins,gitignore,git-add
I'm trying to create a cronjob to backup all my Jenkins configuration in git. The only thing I need to be tracked in my repository is the config.xml in every Jenkins project. The file system is structured like ../jenkins/jobs/[PROJECTNAME]/config.xml. The .git is located in jobs. I don't want to explicitly...

Find out how git removed a file that should be ignored

git,gitignore
I currently have a git repo set up as a bare repository that then git checkout -fs to a public folder for publishing. Recently a commit was made that seemed to delete a file that is in .gitignore. Is there a way to see how that file was deleted? Pulling...

How to ignore obj folder using Git under MS Windows

windows,git,gitignore
I have got following path that I need to exlcude to commit with Git C:\Projects\GitHub\MyProjects\TED\SourceCode\Presentation\REXI.Web\obj Everything is under C:\Projects\GitHub\ is cloned Git repository. And at the same folder I have got .gitignore C:\Projects\GitHub\.gitignore So which pattern I have to use to exclude obj folder? Thank you!...

.factorypath added to .gitignore is not taken into account

eclipse,git,project,gitignore
In .gitignore under the same directory there is .factorypath /.factorypath added for eclipse project. But whenever any change occur in this file it is still visible as modified under git or smartgit. Any idea why ?...

How to ignore everything except a folder and all it's subfolders / contents in git

git,gitignore
In my .gitignore I have: * !file.txt !folder1 !folder1/ !folder1/* This almost does what I want except whenever I add something beyond one folder past folder/ it does not get committed. For instance folder1/test/folder2/test.txt will not be committed. Is there any way to fix this without adding endless * to...

Git add ignored files in .gitignore

git,gitignore
I have created a new repository on Bitbucket and created a gitignore file for the repo. However, when I try to git add --all from bash, it also adds the files that should be ignored. Below is the gitignore file that I am using. Why does it not ignore the...

git add . (dot) doesn't obey .gitignore (or my patterns are wrong)

asp.net-mvc,git,git-submodules,gitignore
I have the following situation. In my asp.net webforms projects, I have some shared repositories that I optionally use under my main repositories. The folders are named Shared and then Shared.* for others. For example, I have a folder structure like this. \main .. \\.git .. \main-subfolder .. \Shared (this...

Does adding “files/” also exclude “backups/files/”?

git,gitignore
I have the following directory structure: backups |_files files I need to exclude the top-level files/ directory but keep backups/files/ in the repo. In my gitignore I have: files/ This excludes the top-level files/ directory but seems to also exclude the files/ directory inside the backups/ directory as well. Question:...

gitignore all files (specific filetype) in a directory and subdirectories [duplicate]

git,gitignore
This question already has an answer here: gitignore all files of extension in directory 4 answers What's the right way to ignore a certain filetype in a certain directory and all subdirectories in it? Example: ignore all .xml files in master/xyz/ and all subdirectories in master/xyz/. I'm not sure...

Git: ignoring .htaccess… just not always

git,.htaccess,gitignore
Here's the scenario: I want to track .htaccess in my repo, since it contains essential configuration. I want to keep prying eyes away from my dev site, so I add HTTP auth directives to .htaccess in dev. During development, I don't want Git to constantly tell me that .htaccess is...

How to ignore any changes on already committed file to Git [duplicate]

git,gitignore
This question already has an answer here: Ignore files that have already been committed to a Git repository 17 answers I need to ignore any changes done to a particular files that are already tracked by Git. Those files should not be removed from either local or remote repository....

Gitignore exclude certain files in all subdirectories

git,gitignore
I have a directory called /static. There is a lot of subdirectories in it. I need to ignore all files in all subdirectories of the /static/ directory except of .htaccess, null.jpg and index.php files. Tell me please what is the right syntax for this operation? /static/** !/static/**/.htaccess and /static/* !/static/*/.htaccess...

Git Ignore not working for folder

git,gitignore
I have files in folder structure like this : freelancer\Presentation\ABC.Web\Plugins\Payments.CheckMoneyOrder\Payments.CheckMoneyOrder.dll , there are other files I want to ignore the whole Plugins folder I tried to put each of the following in the .gitignore file, but none of them work. 1. Presentation/ABC.Web/Plugins 2. Presentation/ABC.Web/Plugins/* 3. */Presentation/ABC.Web/Plugins/* 4. Presentation//ABC.Web//Plugins 5. "Presentation//ABC.Web//Plugins"...

gitignore shouldn't track files in subdirectory, but should track the directory structure [duplicate]

git,gitignore
This question already has an answer here: How to .gitignore all files/folder in a folder, but not the folder itself? [duplicate] 2 answers I have these files: Static/Images/img1.png Static/Images/img2.jpg Static/Files/file1.pdf Static/Files/file2.docx And I want to store the directory structure, meaning: Static Static/Images Static/Files But I don't wanna store these...

Valid global .gitignore steps won't take effect on Mac OS

git,gitignore
I'm trying to set-up global gitignore file on Mac OS but for some reason it doesn't take effect. When I repeat same steps on Linux OS then all go fine. Steps below what I do. Could anyone point out what I'm missing please? Note: I committed .idea files before so...

.gitignore pattern format ** doesn't work

git,github,gitignore
I'm trying to ignore some folders in my .gitignore with the specific pattern format /**/ (I found the docs here : http://git-scm.com/docs/gitignore) like this : src/**/Entity/*.php~ But when I do a git status in the terminal, It return to me this: Untracked files: # (use "git add <file>..." to include...

Keep part of .gitignore under version control but another part out

git,version-control,gitignore
I have a .gitignore where I expect that certain parts should be shared across the project but other parts should be individual-specific. How can I achieve this or a similar effect? My initial thought was to split the .gitignore into two parts, a project-shared and an individual-specific part, where the...

gitignore how to unignore Makefile

git,gitignore
How to unignore Makefile, the name of my Makefile is Makefile, I tried this: * !Makefile but my Makefile is always ignored....

How to commit a file that defies a pattern in .gitignore? [duplicate]

git,ipython-notebook,gitignore
This question already has an answer here: Force add despite the .gitignore file 1 answer I wan't to ignore every IPython Notebook found on my project so I put *.ipynb in .gitignore. However, I would like to commit some specific *.ipynb files that will accompany a release (master branch)....

visual studio 2013 GIT ignore list doesn't ignore dlls

git,visual-studio-2013,gitignore,tfs2013
I am using Visual Studio Online GIT repository on Visual Studio 2013, for some reason my project bin, obj directories and other Dlls and Pdbs are not ignored in change tracking. Here is my .gitignore file, I tried all suggestions found online, like adding .tfignore and other stuff, nothing really...

ignore files ending with numbers with 0-3 digits

git,gitignore
This question must have been asked before, but I was not able to find an answer. I want to use .gitignore to ignore all of the following files: dsmodelext.c dsmodelext1.c dsmodelext2.c dsmodelext23.c dsmodelext107.c Currently I put four lines in my .gitignore file: dsmodelext.c dsmodelext[0-9].c dsmodelext[0-9][0-9].c dsmodelext[0-9][0-9][0-9].c Is there a way...

exclude files from pushing and pulling

git,gitignore,exclude
I have a remote repository that is mirrored to a development site and downloaded to my local machine to work with. When I push changes they update the site by hooks. Update The thing i need: Repository holds whole project with working "configuraion.php" for development site (working online resource for...

How to ignore the contents of a previously tracked directory in git?

git,github,gitignore
I have seen this post about no longer tracking a previously tracked file, but here is my situation. I previously committed a directory. I now want to untrack everything in that directory but still track the directory itself. I have added /auto-save-list/* to the .gitignore file (the directory I am...

Git how to not include specific file(s) to commit

git,gitignore,git-commit
Im trying to not include some files to be commit. For example, I don't want any change in the following files to be included in a commit: bootstrap/start.php So I include them in .gitignore like this: /bootstrap/compiled.php /bootstrap/start.php /vendor composer.phar composer.lock .env.local.php .env.php .DS_Store Thumbs.db.idea .idea/ /public/dbase /public/user_images /app/config/lenovo but...

Git - Commit file in .gitignore

git,gitignore,git-commit
I want to commit and push two new files that are inside a folder that is listed in the project's .gitignore. I figure I can just change the .gitignore file, but then I would require two commits: one commit to push the two new files, and a second commit to...

What does *~ do in a .gitignore file?

git,gitignore
I just ran across a gitignore file that ends with the line *~ but I have not been able to find a description of what this does.

Typical .gitignore file for Android Studio Project [duplicate]

android,git,android-studio,gitignore
This question already has an answer here: What should be in my .gitignore for an Android Studio project? 21 answers I have published my Android Studio Project on github. As Android Studio projects has so many new files like gradle, iml, properties, md etc files, I need to know...

.gitignore: track a single file in an ignored directory

git,gitignore
I am trying to add a single non-tracked file to a repo within a directory that is in a .gitignore. I am using the following: parent/child/* parent/child/child-02/* !parent/child/child-02/file.txt This usually works on a first-child directory but not in the format above. What Am I missing?...

Clean Git Repository using gitignore

git,gitignore
So I have this two year old C# repo on bitbucket. It didn't have a .gitignore until yesterday - I know, late. This is a personal project. Can I clean the repo using the .gitignore as a basis. So the worker would effectively delete anything that the .gitignore said shouldn't...

Ignore line of code in Git

git,gitignore,gitattributes
In my project I would like to ignore a single line of code, because it contains a directory which is different for every user of the repo. I have found a useful answer for my problem, however I don't know how to apply this to my own problem. The line...

Terminal: how can I paste a file to all the subfolders within a directory?

git,terminal,gitignore
Basically, I created a .gitignore file with the following content (ignore all the class files but do not .gitignore file): # Ignore files below *.class # but not these files !.gitignore I want to propagate this to all sub-folders or even sub-sub-folders within the directory. I know I can do...

How to delete unnecessary files from the repository

git,version-control,command,gitignore
I have a repository (Git) with the code, I made a few commands push. But I forgot to do .gitignore file and now I'm in the repository files with the extension .pyc. Is removing them manually give any effect? Is there any command?...

git add file to archive

git,github,gitignore,gitattributes
When I run this command, the files of my latest commit are saved to a ZIP. git archive -o ../code_version0.9.zip HEAD However the files in node_modules and build/ are missing. That Is because my .gitignore is the following one: node_modules build/ How can I ignore files, but Include them In...

How to tell to GIT, it should take care of only these and these sub-folders?

git,gitignore,mql4
I want to use git in a particular development environment. MetaTrader 4. The structure of development directory is fixed, it is of this type: MQL4 Expert Files imagery Include Indicators Some directories come by default with sample files. My idea would be to create directories under of these directories ,...

gitignore all except file in sub-sub folder

git,gitignore
I already tried many combinations of the .gitignore but none worked for what I need. I have this tree: jobs/ jobs/projecta/config.xml jobs/projecta/garbage jobs/projecta/more/garbage jobs/projectb/config.xml jobs/projectb/garbage jobs/projectb/more/garbage Garbage means any other file. I want to commit only the config.xml files, and ignore everything inside jobs/ except them. So I tried: /jobs/*...