git untracked files or directories are files that are not in the git index.
Questions tagged [git-untracked]
60 questions
37
votes
6 answers
What are tracked files and untracked files in the context of Git?
I'm new to Git. I wish to know what are tracked and untracked files?
I read "Pro Git", but still couldn't quite understand.
Can someone explain to me the difference between the two by providing an example?

Nayan Soni
- 1,001
- 3
- 12
- 22
32
votes
1 answer
How to see untracked files in git instead of untracked directory
git status shows directory (e.g smaller_fc) is untracked.
However, I want to see exactly which files inside the directories (e.g smaller_fc) are untracked.
I would like to know if .gitignore is indeed ignoring certain subdir inside smaller_fc…

Jumabek Alikhanov
- 2,305
- 3
- 21
- 21
13
votes
4 answers
Is it possible to skip the staging area and (also) commit untracked, new files to git?
Is it possible to skip the staging area and (also) commit untracked, new files to git in a single built-in, command-line command ? If not, what are the alternatives ?…

nutty about natty
- 1,267
- 2
- 10
- 17
5
votes
2 answers
Lost tracked files when doing git stash --include-untracked
when I did git status, there are both tracked and untracked files. Early the day, I just learned that git stash --include-untracked would stash the untracked files. It worked for me at that time. So I thought git stash --include-untracked would save…

ychz
- 533
- 2
- 7
- 15
4
votes
1 answer
Is there a way to add untracked files in git when adding via patch?
So I'm learning the joys of git add -p. I used to use Sourcetree or similar GUI tool to review changes as part of git add, but now I'm getting better with it on the command line.
However, I'm frustrated that I can't add the untracked files in the…

Dan Sharp
- 1,209
- 2
- 12
- 31
3
votes
1 answer
"git stash apply" not applying untracked files
I earlier ran git stash push -u ... to include an untracked file in the stash. Now, I've confirmed that this stash, stash@{2}, includes this untracked file (and tracked file changes). But, when I run git stash apply 2, only the tracked files get…

user1021
- 61
- 6
3
votes
1 answer
git diff files not in repository against files in repository
I have taken over a project where files on a server are not in a git repository. A git repository was created at some point, but files were still edited on the server without being added to the repository and tracked. Is there a way that I can…

Nate Biondi
- 37
- 4
3
votes
2 answers
why git status shows "working directory clean" even after I add a new file
$ git --version
git version 2.5.3
$ git branch
* feature/branchABC
$ git status -b branchABC
On branch feature/branchABC
Your branch is up-to-date with 'origin/feature/branchABC'.
nothing to commit, working directory clean
$ echo "abc" >…

q0987
- 34,938
- 69
- 242
- 387
2
votes
2 answers
Git Backup untracked files
I have a personal repository managed by git. In There, I have small project with tracked files I already commit and some untracked files I want to add in near future.
Those untracked files are in my local computer. I have no backup. I wonder if it…

Roger Manich
- 81
- 6
2
votes
1 answer
.gitignore and untracked files are shown in git status
I am getting wierd scenario on Centos 7.5.1804 with git 1.8.3.1.
I have .gitignore as
*.pyc
but git status showing following
$ git status
# On branch master
# Untracked files:
# (use "git add ..." to include in what will be committed)
#
# …

Shashwat Kumar
- 5,159
- 2
- 30
- 66
2
votes
1 answer
git commit modified and untracked content
I have setup git to my project to push modifications to gitlab repository.
I installed a plugin from github which lies in /vendor/dereuromar/cakephp-queue
There is also a .git directory and other files associated with git in the plugin's…

Anuj TBE
- 9,198
- 27
- 136
- 285
1
vote
1 answer
Git Repository - Error Code 128 when merging two pdfs
After I committed two PDFs using "Git add - a", it led to my next problem, Error 128.
I am very new to this Get Repository thing. I am not sure how to fix it with the Go Daddy Terminal. Any help is sincerely appreciated.

Sam Mah
- 31
- 6
1
vote
1 answer
Decoration/Marker "U" in Visual Studio doesn't change to "A" after staging ("git add .") the file
This is my first question in StackOverflow (hello!). :)
The thing is that with my IDE, Visual Studio Code, I can not change the "U" of untracked for an added file.
After I include a new file into my repository, the file is untracked by git (and…

Miguel Frutos
- 11
- 2
1
vote
1 answer
GitHub Desktop suddenly not fetching origin, can't push changes
We've run into a problem with one of our contributors using GitHub desktop. When they try to push their most recent changes the following error appears
On branch main
Your branch is up to date with 'origin/main'.
Changes not staged for commit:
…

David Jones
- 11
- 3
1
vote
0 answers
Git merge says "The following untracked working tree files would be overwritten by merge" but the files listed are tracked
I don't see the files listed as untracked in git status, and have even tried to modify one and it does show up as modified in git status, so the files are tracked. Why does git merge says they are untracked?
This is a git-annex repo if that…

Arnaud
- 43
- 3