How to commit & push selected files but not all in Git

左心房为你撑大大i 提交于 2019-12-01 21:20:14

When you make a commit, all the staged file are included in the commit. If you wish to exclude certain files from a commit, unstage those files first.

I'm not sure how to do that with the Git UI you are using, but there should be a screen or something to manage which files with changes are staged and which aren't.

Use terminal to commit selected file : like: you have 100 files (10 type)

git add *.* all file

git add *.jpg all jpg file

$ git add . # add to index only files created/modified and not those deleted

$ git add -u # add to index only files deleted/modified and not those created

you can use source tree for all git work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!