How to get git-status of a single subfolder? -
When I position GIT in the subfolder of my repository, it also includes the status of the parent folders.
Is there any way to distribute the git-status only in a particular folder?
git status.
Will show the status of the current directory and subdirectory.
For example, the files (numbers) given in this tree:
sub-directory "b", git status
from the show / 1A / 2B / 3B / 4B / C / 5B / C / 6
New files in whole tree:
% git Status # Branch Master # # Initial commitment # # Changes to change: # ("git rm --cached & lt; file & gt;.") # # New file: ../a/1 # New file:. ./a/2 # new file: 3 # new file: 4 # new file: c / 5 # new file: c / 6 #
but git status.
Just shows "B" and the file below.
% git position # # # new file: # # new file: # # # # new file: # # new file: # # new file: # # new file: # # new File: # (# git rm --cached & lt; file & gt; C / 5 # New file: c / 6 #
Just this subdirectory, not below
< P> git status.
shows all the files below "B" to recursively show the file in "B" but not below, only you (.)
. For: % git position * (.) To make the initial commit changes to the branch master: ("git rm --cached file & gt; ..." For use) File: 3 new file: 4
Bash
There is no Globe qualifier in Bash but you can select GNU Find You can use
and then pass them as git status
:
bash-3.2 $ find-type f -maxdepth 1 -exec Git status {} + To make initial commitments to the branch manager: ("git rm --cached & lt; File & gt; ... ") unstage new file: 3 new file: 4
This is an extension that uses -maxdepth
. Is not -maxdepth
, but you can:
bash-3.2 $ find-path '* / *' -prune -type f -exec git status {} + To make initial commitments on the Master Master: unstage new file to use ("git rm --cached & lt; file & gt; ..."): 3 new files: 4
Comments
Post a Comment