How to make git command only target the current directory

background

The git warehouse we sometimes build looks like this. There are three modules (folders) b, c, and d in the a directory. Sometimes we only want to check the changes under b, but when using git status, git diffthe changes in c and d will be listed. How can we only check the changes in the b directory?

operate

To check the changes in the b directory, cd to the b directory, and then use git status .and git diff ., git checkout .. The command is only for the current b directory, as if a separate git warehouse was built in the b directory.

おすすめ

転載: blog.csdn.net/w8y56f/article/details/133424978