David J.
David J.

Reputation: 1913

git: automatically add any files updated within a directory to the staging area

I'd like to automatically have files that I save within a directory be added to my project's staging area, i.e. for each file X, git add X should be run.

Can someone show me the easiest way to do this?

Upvotes: 1

Views: 267

Answers (1)

이경언
이경언

Reputation: 176

If you are at the top of your working directory, you can add all files to staging area using "git add . " command.

git add .

And if file is tracked you can add all files to staging area using "git commit -a".

git commit -a -m "-m option can write commit message"

Upvotes: 1

Related Questions