Thursday, May 13, 2021

GIT Basic - 3 Add multiple files recursively

 you may need to add more than file at a single time. easy way is to add all the files going to root directory using period(.)

git add . 

you can follow the below example

make sure your repo is clean

git status

create directory structure

mkdir -p lv1/lv2/lv3/lv4

ls

you will see the top level directory

To verify

cd lv1 

pwd    verify where u re 

create some files in each level

now check status from project folder

git status

will show only root level folder "lv1"

add all files with period(.)

git add .

git status


No comments:

Post a Comment