开发者

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 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜