git restore

從stage恢復工作區

git restore -W xxfile

git restore --worktree xxfile

 

從本地倉庫恢復暫存區index

git restore -S xxfile

git restore --stage xxfile

 

從本地倉庫恢復工作區和index

git restore -W -S xxfile

git restore -W -S commitid xxfile

posted @ 2025-03-19 08:44  海哲飞  阅读(7)  评论(0)    收藏  举报