Re: newbie - missing file from untracked list
- From
Jiang Xin <worldhello.net@gmail.com>
- Date
- Jul 19, 2011, 02:56 UTC
- Message-ID
- <4E24F275.3030906@gmail.com>
- In-Reply-To
- <1311040156386-6597192.post@n2.nabble.com>
于 11-7-19 上午9:49, govinda 写道:
Show 18 quoted lines
> [Govindas-iMac-2:SS_site_root] Govind% git add mainline_finishes.html > [Govindas-iMac-2:SS_site_root] Govind% git status > # On branch Gov_SS_2011-07-16 > # Changes to be committed: > # (use "git reset HEAD <file>..." to unstage) > # > # new file: VL_ShowMan.html > # > # Untracked files: > # (use "git add <file>..." to include in what will be committed) > # > [snip] > # Intranet_IE/CSI_Admin.html > # Intranet_IE/DealerUpdate_Approve.html > [snip] > > ^^^ *where* is 'mainline_finishes.html'?! >
If the file 'mainline_finishes.html' is already in the repository, add it again without any modifications, the file will not show in git-status output.
You can see files aready in HEAD:
$ git ls-tree HEAD
or files in stage.
$ git ls-files -s
Show 5 quoted lines
> I would sort that untracked file listing for ease of reading.. but I do not > know how (if it is even possible)... is there an option for 'git status -?' > that causes the list to sort alphabetically? At the moment is seems to try > to sort ..but breaks the lists into a couple/few separate clumps of > otherwise alphabetized file names. (That makes no sense to me.)
$ git status -s | grep "^?" | sort
-- Jiang Xin