Yauhen Yakimovich
Yauhen Yakimovich

Reputation: 14211

Best practice to stage files in git

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

Upvotes: 1

Views: 1425

Answers (2)

Yauhen Yakimovich
Yauhen Yakimovich

Reputation: 14211

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

Upvotes: 0

Adam Dymitruk
Adam Dymitruk

Reputation: 129594

Why is

git add -p -- some/dir

not good enough?

There is also git-gui

Hope this helps

Upvotes: 9

Related Questions