EKK
EKK

Reputation: 4138

How to git stage an one by one the folder with files in Visual Studio Code?

I have a folder with other subfolders. Then in each subfolder many files (over 1000). I want to stage, commit each subfolder at a time (not all subfolders folders at once).

Do I have in VSCode a way to do this easly form interface? Because I do not want to add 1000 files one by one to click the + sign.

Upvotes: 1

Views: 2798

Answers (2)

tSuNOOPY
tSuNOOPY

Reputation: 21

you can try lazygit: https://github.com/jesseduffield/lazygit. It can stage folders one by one.

Upvotes: 0

Casper T.
Casper T.

Reputation: 64

You can easily do this through the integrated terminal. You can choose to add and commit one directory at a time.

git status */

will show you unstaged/modified directories

On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        img/test.txt

nothing added to commit but untracked files present (use "git add" to track)

From here you can stage your directories one at a time. This is a simple and quick way. Now you just commit every time after staging a directory.

Upvotes: 1

Related Questions