git rm & git restore
Remember that each file in your working directory can be in one of two states: tracked
or untracked
. Tracked files are files that were in the last snapshot, as well as any newly staged files; they can be unmodified
, modified
, or staged
. In short, tracked files are files that Git knows about. As you edit files, Git sees them as modified, because you’ve changed them since your last commit. As you work, you selectively stage these modified files and then commit all those staged changes, and the cycle repeats.
Some commands are used frequently, the commands below will make a diffference on Git repository but won’t change the wok place (file system):
The commands below will change both work place and Git repository:
查看其他文章