git untracked files or directories are files that are not in the git index.
Questions tagged [git-untracked]
44 questions
30
votes
5 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?
![](../../users/profiles/1053113.webp)
Nayan Soni
- 911
- 3
- 11
- 20
20
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…
![](../../users/profiles/2351184.webp)
Jumabek Alikhanov
- 1,994
- 3
- 17
- 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 ?…
![](../../users/profiles/2153622.webp)
nutty about natty
- 1,071
- 2
- 8
- 13
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…
![](../../users/profiles/1424291.webp)
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" >…
![](../../users/profiles/391104.webp)
q0987
- 31,246
- 61
- 222
- 356
2
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…
![](../../users/profiles/1218280.webp)
Dan Sharp
- 985
- 9
- 24
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)
#
# …
![](../../users/profiles/1053930.webp)
Shashwat Kumar
- 4,541
- 2
- 24
- 49
1
vote
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…
![](../../users/profiles/6548256.webp)
Roger Manich
- 41
- 5
1
vote
2 answers
Git is considering a checked in file as untracked, upon rename
In my git project, one of the developer changed the filename from all uppercase to CamelCase yesterday. in his feature branch and merged to master
I pulled the remote master. Now during any local git operation, git shows message for the file in…
![](../../users/profiles/9692178.webp)
ThrowableException
- 294
- 1
- 9
1
vote
1 answer
find lost `git write-tree`
I have a script that uses git write-tree to make up for the deficiencies in git stash, it works perfect unless I ctrlC the script.
[... other parts of script ...]
exec('git add -f .');
workingTreeHash=exec('git write-tree');
exec('git checkout -f…
![](../../users/profiles/12802110.webp)
figl
- 35
- 1
- 4
1
vote
1 answer
untracked files
~ master ?49 ❯ git status
> warning: could not open directory '.Trash/': Operation not permitted
On branch master
No commits yet
Untracked files:
(use "git add ..." to include in what will be committed)
~ master ?49 ❯
> nothing added to…
![](../../users/profiles/9921821.webp)
maievS
- 29
- 4
1
vote
1 answer
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…
![](../../users/profiles/7905775.webp)
Oscar Zhang
- 374
- 2
- 6
- 13
1
vote
1 answer
Is there a way to silently say yes to untracked file in arc patch?
When I arc patch I will get
You have untracked files in this working copy
Ignore these untracked files and continue (Y/n)
I dont want to delete the untracked files or put them into .gitignore. I just want to silently say yes. Is there a way to…
![](../../users/profiles/8749222.webp)
Justin Lin
- 435
- 3
- 10
1
vote
1 answer
Add a submodule to each branch of a parent project
I have a project called channel, which has only one branch -- master. And I have another project called bigTest, which has four branches -- master, dev, stable, release.
Nowadays I want to add channel to the root directory of bigTest as a submodule…
![](../../users/profiles/4799214.webp)
Bryan YU
- 77
- 9
1
vote
1 answer
How do I remove unwanted, untrack directories from my git branch?
For some reason I have untracked folders in my git branch that have nothing to do with my current directory. They seem to be mostly parallel directories.
I have no clue why but I've tried to use git ls-files --others --exclude-standard >>…
![](../../users/profiles/7314924.webp)
ZST
- 39
- 1
- 6