Skip to main content

Questions tagged [gitignore]

.gitignore is a file that lists files, directories, and/or path patterns that Git should not include as part of a repository.

gitignore
Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Expo gitignore ios and android folders

My generated info.plist has some identifiers such Google Login client ID. While this isn't a "secret", I don't want to commit this to a public git repo. Given the entire ios and android ...
DD.'s user avatar
  • 21.8k
2 votes
1 answer
47 views

Should I put Django venv directory in .gitignore?

In my book Python Crash Course 2nd edition it is recommended to put ll_env (venv directory) in .gitignore. It says, "We tell Git to ignore the entire ll_env directory, because we can re-create it ...
Coder4Fun250's user avatar
0 votes
1 answer
28 views

How to synchronize changes from a source repo to a destination repo triggered from a push to the source main except some files

I want to synchronize changes from a source repository to a destination repository whenever there is a push to the main branch of the source repository. However, I do not want to sync changes to the ...
Ilias Machairas's user avatar
2 votes
0 answers
78 views

git: untracked files not being ignored [closed]

So, i'm doing a little project with rust and i would also like to use git in order to learn both in a more practical way. The problem started when i created gitignore, because in rust, both the "...
Matt2code's user avatar
-1 votes
1 answer
54 views

File is added to .gitignore but is still shown in "Working directory changes" [duplicate]

I'm working with files with a specific filename, something like: Site/Product Client/Modules/Product.Customer.Client.dll (The words "Product" and "Customer" are replaced by ...
Dominique's user avatar
  • 17.2k
0 votes
1 answer
33 views

Unstaged files that were accidentally uploaded to GitHub before there was a gitignore file

My friends and I are working on a project in github but by mistake changes were pushed to master before a gitignore file was uploaded that indicates to ignore these files And when someone wants to ...
רחל's user avatar
  • 1
-1 votes
1 answer
43 views

Do I need to commit my .gitignore with paths containing spaces to see changes in my status?

I have a .gitignore which ignores all .docx files. I want to add an exception, BUT I just made multiples commits with modification to my .gitignore file and I still can't see my docx. The first thing ...
DeveCout's user avatar
-1 votes
2 answers
44 views

gitignore file inside a folder and want to exclude a folder outside that

I have my current repo setup like below project/ ├── .cicd ├── .github ├── .idea ├── .primer ├── airflow/ └── module/ └── .gitignore I have my .gitignore file inside module folder. Now, I want to ...
prisoner's user avatar
0 votes
0 answers
28 views

How to properly exclude specific files from .gitignore

I'm trying to get a .gitignore working in wordpress. I want to exclude the uploads files and the temporary plugin upgrade files, but not ignore the .htaccess and index.html static files in those ...
Scott Wood's user avatar
0 votes
0 answers
63 views

The file cannot be removed even though it is included in the .gitignore list

I have a Flutter project that initially did not have a .gitignore file. After adding the .gitignore file and cleaning up with the following commands: git rm -r --cached . git add . git commit -m "...
maulz's user avatar
  • 1
0 votes
0 answers
39 views

Excluding a directory from git version tracking but using it in a GitHub workflow

I'm a technical writer working with DITA XML and using it to publish to HTML. I keep my DITA XML in Git on GitHub, and manually use a workflow in GitHub to publish the resulting HTML to an Azure ...
Masu's user avatar
  • 9
0 votes
1 answer
30 views

Why is adding files to .gitignore deleting it in remote?

I am just playing around and trying to understand .gitnore and how it works. I noticed the previously tracked items, after adding to .gitignore are deleted in remote after pushing the commit. I have a ...
Nishant0823's user avatar
-1 votes
1 answer
41 views

.gitignore, difference between dir, dir/ and dir/* [duplicate]

In .gitignore what's the difference between dir dir/ dir/* ? As more real-life scenario, consider config instead of dir, when there are config-dirs and config-files
bolt's user avatar
  • 441
1 vote
2 answers
46 views

Gitignore in subfolder to ignore any file of any project level

I wanna have a general .gitignore, which will contain dirnames and filenames of any level of a project, but put it into a subfolder. For example, I wanna ignore folder "c", project structure:...
SZx's user avatar
  • 23
0 votes
0 answers
39 views

Git: Merge all files except specified ones

I have two git repositories, let's call them WidgetsParent and WidgetsChild for the purposes of this. WidgetsParent moves a lot quicker than WidgetsChild and, on a periodic basis, WidgetsChild needs ...
snakespan's user avatar
  • 1,201
0 votes
1 answer
33 views

git ignore classess not ignore in intellij idea

I am using IntelliJ IDEA but when I want commit it shows all class file. Here is the image; Here is the gitignore code... ELP.md target/ !.mvn/wrapper/maven-wrapper.jar !**/src/...
Enamul Haque's user avatar
  • 4,977
0 votes
0 answers
13 views

How to add exception to ignored common directories?

I'm excluding several paths from subdirectories in git, but sometimes I want certain files to be included. the project tree is . ├── D │   └── DukeNukem │   └── drive_c ├── W │   ├── ...
gcb's user avatar
  • 14.4k
1 vote
2 answers
35 views

.Gitignore Issue in laravel

I am trying to put session and logs directories into .gitignore file in my Laravel 10 project, but they are not ignored and are still tracked. I have tried to delete the folders and create them again, ...
Jamil Andaz's user avatar
2 votes
1 answer
49 views

Ignore all wordpress folder except my specific plugin

I'm working on a wordpress plugin as part of a larger project. The wordpress install sits in a wordpress folder, I want to ignore all of the wordpress install except the specific plugin that I'm ...
user21147044's user avatar
0 votes
0 answers
34 views

VS Code: .gitignore not working for excluding ".terraform/" folders

I am trying to exclude the terraform directories and files in VS Code, using the https://github.com/github/gitignore/blob/main/Terraform.gitignore template, however it does not seem to work,it tries ...
Norbert's user avatar
0 votes
1 answer
54 views

.gitignore not to ignore a certain file name in ignored subfolders

My project has many (currently 2) subfolders with name .vscode/ and I need my .gitignore to ignore that subfolders and all its files, excepting the one called launch.json My .gitignore is like this ....
Windgate's user avatar
  • 399
-1 votes
1 answer
75 views

.gitignore ignore any subfolder with name .vscode [closed]

I'm starting a repo with 1 development project and 1 testing project, so there are 2 different projects in the same repo, I'm working with Visual Studio Code. I need to specify in the .gitignore file ...
Windgate's user avatar
  • 399
0 votes
0 answers
21 views

GitBash Terminal Crashes When Adding Files, Including .gitignore, to Staging Area

I'm working on a Node.js project and encountering an issue while pushing to my GitHub repository. I've added the node_modules folder to the .gitignore file to exclude it from Git, but when I use the ...
JOSEPH BHARATH's user avatar
0 votes
1 answer
227 views

Which files and directories should be ignored in a Flutter project?

I have to create a new Flutter project from scratch and pushing it to GitGub. So, as first step I've created a new git repository through: git init I've copied the .gitignore from Flutter GitHub repo,...
federico D'Armini's user avatar
0 votes
1 answer
85 views

git gives hint to "dispable or modify the sparsity rules" when "worktree is not sparse"

I rarely use a sparse checkout (more likely to use a shallow clone). I almost always use a .gitignore file. That file is sometimes configured to ignore directories or files that are already part of ...
Kevin's user avatar
  • 2,531
0 votes
0 answers
38 views

Unable to gitignore .nx/cache from my Angular project after migrating NX

I am in the process of migrating Angular for a project I am working on. I need to migrate NX in the process. On one of the recent NX updates (I believe it was v16 -> v17), they added in .nx/cache, ...
IMeyers20's user avatar
-1 votes
1 answer
33 views

How to ignore all files in a repository except a small list of given files? [duplicate]

I have a git repository with the following structure: .\.gitignore .\Dir1 .\Dir2 .\Hello world.txt .\Dir1\Hi.txt .\Dir2\Hey!.txt And I want Git to track only the .\Dir1\Hi.txt, so I excluded all the ...
kiewic's user avatar
  • 16.2k
0 votes
0 answers
72 views

gitignore for Unity VR project does not work

this is my first time posting so forgive me if I forget relevant information! I am working with Unity on a VR project and I wanted to use some sort of version control, so I am using GitLab. To not ...
Celine Honekamp's user avatar
0 votes
1 answer
58 views

File in the same path, one can be git trace but others cannot

I have a git repo at path dir_a, and I have a file that I want to trace it at dir_a/dir_b/dir_c/memory.cpp. But I can't trace it, when I try to add it git add ./dir_b/dir_c/memory.cpp , it will ...
Molly Zheng's user avatar
0 votes
2 answers
57 views

Git adding .gitignored files from nested target, even after reset

My .gitignore file for a bunch of rust code: # Generated by Cargo # will have compiled files and executables */target/ */target/* # Performance stuff **/*.data **/*.data.old **/*.svg # Remove Cargo....
Edward Peters's user avatar
0 votes
1 answer
48 views

Extra files included in push e.g. settings.py

I'm trying to get with the program and embrace Git. I've got a Django project and added a Git repo on my local machine. Have a branch called Dev. I want to be able to push chunks of code up to my live ...
Mark Challice's user avatar
0 votes
1 answer
55 views

how to ignore a specific subfolder in GitHub without removing the parent folder using .gitignore? [duplicate]

I'm working on a project in Git and I want to ignore a specific folder ./unit_testing/test_cache. However, i need to keep ./unit_testing folder itself. But When I push my code in GitHub this ./...
codebysumit's user avatar
-2 votes
1 answer
68 views

Why do I have a bunch of untracked files in my source control, files that I didn't create or modify that are not supposed to exist in my project? [duplicate]

I would like it to not add those untracked files to my project. I just imported the project from GitLab, change some things, and it adds all of that. From what I see, the files are mostly empty and ...
Mak's user avatar
  • 7
0 votes
0 answers
25 views

What's the difference between **/foo and foo in a .gitignore file?

Are **/foo and foo in a .gitignore file synonyms? For example, do these two lines do the same? **/.DS_Store .DS_Store A leading ** followed by a slash means match in all directories. For example, **/...
ttt's user avatar
  • 6,596
-1 votes
2 answers
96 views

.gitignore not ignoring files correctly

I have a TeX project. I want to ignore some file extensions which I have added in the .gitignore file, but they are still shown as untracked files in git status. How to make git not track these files? ...
rupsagar's user avatar
0 votes
0 answers
45 views

Hide nested git repo to outer repo

I have two clojure projects, A and B. Both of them are git repos. Project B is used as a packaged dependency in project A (a .jar). To test and work on project B I need to use it in project A. So I ...
Carlos Griñán's user avatar
-1 votes
1 answer
108 views

How do I override a particular extension on a .gitignore file?

I have a rule in the .gitignore file of my GitHub repo to ignore all .jar files that will come up during development. Now, I am working on an upgrade task, which has some Jar files that need to go ...
DEBAGNIK KAR's user avatar
0 votes
0 answers
22 views

How can I ignore changes to .gitmodules file? [duplicate]

I wish to ignore changes made to my .gitmodules file. I thought it would be as easy as adding it to .gitignore, but Git still tracks changes to this file. How can I ignore changes to .gitmodules?
Mossmyr's user avatar
  • 969
1 vote
2 answers
177 views

exclude file in Git Template directory does not work

I am trying to exclude all text documents in my dummy repo as what my textbook suggested. Using my desktop's GUI (and not the terminal), I copied and pasted the exclude file from the git-core git-core/...
Issac Howard's user avatar
1 vote
1 answer
153 views

Handling API Keys in Angular

I want to push all of my source code to my Git repository, but I don't want to include my API key. In the environment.ts file, I have the API key, and in the movies.services.ts file, I make the call ...
Reiz Daci's user avatar
0 votes
2 answers
37 views

is there a non destructive way (no commit, no changes to the repo) to let .gitignore file itself be really ignored in git version 2.34.1 or later?

is there a non destructive way (no commit, no changes to the repo) to let .gitignore file itself be really ignored in git version 2.34.1 or later? I've been trying many answers from How can I stop ....
Aquarius Power's user avatar
1 vote
2 answers
90 views

Git not excluding even untracked files

I am running into a problem with git. I have initialized a new git repo and wrote ".gitignore" first but git is not excluding those files and folders. I have tried "git rm -r --cached&...
Muhammad Zeeshan's user avatar
0 votes
0 answers
59 views

How to git ignore everything apart from some select files and directories

I'm having some trouble getting my .gitignore in just the way I want it. I've looked at previous questions on StackOverflow and I've also asked ChatGPT but I just can't get the result I want. This is ...
Mo0rBy's user avatar
  • 491
0 votes
1 answer
53 views

Did git or visual studio code remove my folder?

So here's what happened. I am working on a small software development project and I have a git repository that I work on in VS code. So far so good. I did some restructuring of the project recently ...
ltr's user avatar
  • 340
0 votes
0 answers
27 views

Gitignore and commit history issues

I'm starting a new project in unreal engine, using smartgit, and the first thing i did was make a gitignore, although for reasons i'm not clear on, it doesn't seem to have worked, and i didn't notice. ...
Nanako's user avatar
  • 59
0 votes
0 answers
61 views

Although I add venv and db.sqlite3 to .gitignore, git pushes these files too [duplicate]

I created a .gitignore file and added these things as different rows: __pycache__ db.sqlite3 .env venv/ When I follow the routine way (add . -> commit -> push -u origin main), .gitignore works ...
Redhill's user avatar
  • 13
0 votes
1 answer
177 views

How to include a venv folder in the gitignore

I have a venv -python virtual environment- folder within my unity project, and to backup my project i commit and push to github. But after including this venv file within the project itself. The venv ...
Felixmona's user avatar
-4 votes
1 answer
632 views

Ignore .DS_Store files in macOS in git without adding it in local .gitignore file? [duplicate]

I switched from Ubuntu to macOS, and now I frequently use Git. However, there's a file in macOS called .DS_Store that is automatically generated by macOS Finder. Is there any way to ignore the ....
Pritam's user avatar
  • 1
1 vote
0 answers
56 views

How to un-ignore certain globs when explorer.excludeGitIgnore is true in VSCode?

VSCode has a setting to parse and exclude gitignored files from the explorer and search: explorer.excludeGitIgnore. Generally this is ok, but sometimes I want an untracked file to show up so it can ...
nefrob's user avatar
  • 100
0 votes
0 answers
37 views

JavaFX in VSCode on different systems problem

I want to use VSCode and JavaFX with a laptop with Linux (Pop.OS) and a Windows11 pc. If i want to use the javaFx Libary, then i have to write this in the Launch.json: "vmArgs": "--...
user avatar

1
2 3 4 5
61