forsaken_3479
forsaken_3479

Reputation: 1124

A git command for adding all changes to staging

Suppose I have three files, one, two, and three. After initializing git and adding it to a remote repo, I now delete two.txt and modify three.txt. So while adding and committing now I have to do "git rm two.txt" and then go for "git add ."

My question is, do we have a command that can take all changes to staging area? Basically something like "git " that will update everything to stating area instead of manually having to delete.

Upvotes: 0

Views: 70

Answers (2)

manojlds
manojlds

Reputation: 301147

You are looking for:

git add -A

From git 2.0 onwards:

git add .

Upvotes: 2

Ellery
Ellery

Reputation: 1426

Use the following command

git add -A

Check out this question:

Difference between "git add -A" and "git add ."

Upvotes: 2

Related Questions