Difference between stash vs stage files in GIT -
hy,
when need save changes 1 branch before checking out other branch, git says: stage or commit files before can checkout other branch. have been recommended use stash option so:
1.stage files not enough save files before checking out other branch?
- what differences between stage , stash files?
thanks
1.- more "save" files, act git expect according flow. (advice, git knows :) )
2.- stash move modified files stack. so, later in same or in branch, able bring them , see modifications in project.
stage step before make commit, add modified files "staged files" create next commit.
now, stash files
$git stash
and add files (stage)
$git add
now, why better stash changes staging them? maybe part of documentation can solve doubts: documentation:
stashing:
often, when you’ve been working on part of project, things in messy state , want switch branches bit work on else. problem is, don’t want commit of half-done work can point later. answer issue git stash command.
see links below :
Comments
Post a Comment