saturngod
saturngod

Reputation: 24949

git add except 1 folder

I don't want to submit projectname.project folder. Now, I use like that

git add .
...

...
git push orign master

I don't want to submit projectname.project folder. When i use

git rm -r projectname.project

git remove my projectname.project in my computer and I need to create a project again.

Upvotes: 3

Views: 6985

Answers (3)

MBO
MBO

Reputation: 31025

It depends what you want to do:

  1. If you only want to not add projectname.project to index and actual commit, but leave for future git monitoring, then git reset projectname.project should work
  2. If you want to completly remove porjectname.project from tracking by git then add this to .gitignore (to prevent adding this in the future), remove it from cache (if it has been already tracked) with git rm --cached projectname.project

Upvotes: 5

shingara
shingara

Reputation: 46914

You can delete from index in git not in your filesystem

git rm -r projectname.project --cached

Now this directory is delete in versonning not in your filesystem

Upvotes: 11

Jan Dudulski
Jan Dudulski

Reputation: 843

add it to .gitignore (more about on github guide)

Upvotes: 7

Related Questions