Reputation: 6368
For some reason, $ git status
shows me changes to other directories:
How do I instruct git to stop tracking outside directories?
Upvotes: 0
Views: 140
Reputation: 385734
The files aren't outside of your repository; you're in a subdirectory of your repository.
$ find
.
./subdir
./subdir/bar.txt
./foo.txt
$ git init .
Initialized empty Git repository in /tmp/ikegami/.git/
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# foo.txt
# subdir/
nothing added to commit but untracked files present (use "git add" to track)
$ cd subdir
$ git status
# On branch master
#
# Initial commit
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# ../foo.txt
# ./
nothing added to commit but untracked files present (use "git add" to track)
If your current directory is suppose to be your repository, you used git init
instead of git init subdir
, or you used git clone url .
instead of git clone url subdir
.
Upvotes: 2
Reputation: 13099
Maybe the question is unclear, and what you actually want is:
git status .
Upvotes: 1