2

I have many files in vs code that they are not committed yet I want to add one folder with all files in it is there any way to do it

the is a command git add --all but it adds also all files that I don't want to add just files in the folder that I am in it I want to add and commit.

4
  • 1
    Try git add folder_name Commented Jul 20, 2021 at 11:36
  • actually I have many files that I don't want to commit them they are from another project I want to add all files from a folder NOT other files from another folder that are not committed yet. Commented Jul 20, 2021 at 11:38
  • How many projects you have in one repository? If you want to add just one folder to the staging area, you can use git add folder. It will add just that folder and all of its files into the staging area. Then you can commit. Commented Jul 20, 2021 at 11:44
  • Now it is solved the problem was that I was not in parent folder. thanks a lot Commented Jul 20, 2021 at 12:12

1 Answer 1

4

You can just do git add <folder name> and then any changed files in that folder will be added to git when committed.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.