开发者

git add except 1 folder

开发者 https://www.devze.com 2022-12-22 04:09 出处:网络
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. 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 proje开发者_Python百科ctname.project

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


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


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


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号