git add 多個檔案和資料夾的方法

2021-09-20 18:51:37 字數 585 閱讀 1441

方法一 git add 新增多個檔案,檔案之間以空格隔開

git add file1 file2 file3
方法二 多次git add

git add file1

git add file2

git add file2

方法三 新增指定目錄下的檔案

config目錄下及子目錄下所有檔案,home目錄下的所有.php檔案

git config/*

git home/*.php

方法四 git add . 新增所有的檔案, 或者 git add --all 新增所有的檔案

git add .

git add --all

git add 資料夾名
git add 目的是將修改檔案由工作區提交到暫存區,可以多次提交

然後commit操作,將檔案從暫存區提交到版本庫

git commit -m "add new file"

C 檔案和資料夾

獲取啟動了應用程式的可執行檔案的路徑,不包括可執行檔案的名稱。返回上一級路徑 是你返回的資料夾級數 string parentpath di.fullname 判斷檔案是否存在 if system.io.file.exists parentpath directory.exists path pat...

刪除檔案和資料夾

一 刪除檔案 使用 del 命令,可以檢視幫助資訊 del p f s q a attributes names erase p f s q a attributes names names 指定乙個或數個檔案或目錄列表。萬用字元可被用來 刪除多個檔案。如果指定了乙個目錄,目錄中的所 有檔案都會被刪...

刪除檔案和資料夾

一 刪除檔案 使用 del 命令,可以檢視幫助資訊 del p f s q a attributes names erase p f s q a attributes names names 指定乙個或數個檔案或目錄列表。萬用字元可被用來 刪除多個檔案。如果指定了乙個目錄,目錄中的所 有檔案都會被刪...