2

first, i created a local repository, then let us look this command of git.

$touch test1
$touch test2
$touch test3
$touch test4
$touch test5
$touch test6
$touch test7
$touch test8
$touch test9

modifying the file content of test1, test2, test3, and

$rm test5
$rm test6
$rm test7
$rm test8

So, i need to do all of operations before commit the changes, here's the question, how do i finish the operation with one command at one time, rather than change them one by one.

coolesting
  • 1,451
  • 5
  • 18
  • 22

1 Answers1

1
git add -A

should be the right command for updating the index with new files, removed files and modified files.
See "Difference of "git add -A" and "git add ."".

Then one commit will record all your staged modifications.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250