日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

git add -u与-A .三者的区别

發布時間:2025/3/21 编程问答 47 豆豆
生活随笔 收集整理的這篇文章主要介紹了 git add -u与-A .三者的区别 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

git add -u:將文件的修改、文件的刪除,添加到暫存區。
git add .:將文件的修改,文件的新建,添加到暫存區。
git add -A:將文件的修改,文件的刪除,文件的新建,添加到暫存區。

-u就是update的意思,只會標記本地有改動(包括刪除和修改)的已經追蹤的文件
???????-u, --update
???????????Update the index just where it already has an entry matching
???????????<pathspec>. This removes as well as modifies index entries to match
???????????the working tree, but adds no new files.


???????????If no <pathspec> is given when -u option is used, all tracked files
???????????in the entire working tree are updated (old versions of Git used to
???????????limit the update to the current directory and its subdirectories).

-A
???????-A, --all, --no-ignore-removal
???????????Update the index not only where the working tree has a file
???????????matching <pathspec> but also where the index already has an entry.
???????????This adds, modifies, and removes index entries to match the working
???????????tree.


???????????If no <pathspec> is given when -A option is used, all files in the
???????????entire working tree are updated (old versions of Git used to limit
???????????the update to the current directory and its subdirectories).


1. ?git add -A ??保存所有的修改

2. ?git add . ????保存新的添加和修改,但是不包括刪除

3. ?git add -u ??保存修改和刪除,但是不包括新建文件。

如圖:


---------------------?
作者:rockly89?
來源:CSDN?
原文:https://blog.csdn.net/ly890700/article/details/53526744?
?

總結

以上是生活随笔為你收集整理的git add -u与-A .三者的区别的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。