Different uses for -p in Git
Many Git users are familiar with git add -p (interactively stage hunks for commit). Not as many are familiar with using -p with other commands. You also do a git reset -p (interactively unstage hunks from the index), git checkout -p (interactively restore hunks to their state in a commit, probably HEAD), or git stash save -p (interactively select hunks for stashing). These variants really come in handy if you like to work in small chunks!
Written by Rob Hoelz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#