开发者

Best practice to stage files in git

开发者 https://www.devze.com 2023-03-11 18:25 出处:网络
I am looking for a better description of staging files with git itself (other than Git big commit best practices).

I am looking for a better description of staging files with git itself (other than Git big commit best practices). I don't need to stash files into smaller commits, ignore files by pattern, etc. What I am looking for is a tutorial that is only about adding files - efficient by browsing through big packs (up to 100) of "unstaged" files and maybe editing them (as hunks).

Command line tricks with pi开发者_Go百科peline filtering like in

git status -uno --porcelain | gawk '{ print $2 }' | xargs echo | xargs git add

are offtopic.

Bottom line: I am looking for tips to "master" interactive mode and patterns in staging with

git add


Why is

git add -p -- some/dir

not good enough?

There is also git-gui

Hope this helps


Just wanted to mention that now I use in my daily git business

git commit -a

or if I need to make choices the interactive mode with

git add -i
0

精彩评论

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