git extensions - Git: alternative for stash -
i'm using git extensions projects. it. there issue keeps bugging me , i'm pretty sure there trick in git extensions it. here scenario:
- from master branch, created 3 branches
a
,b
,c
. - started working in branch
a
, did changes - switched branch
b
, still see changes made ina
not committed- i don't want commit changes in
a
because i'm not done yet , don't want commit appear in commit history - i don't want stash changes in
a
because if make changes inb
, switchc
, have stash changes inb
==> changes ina
gone: overridden new stash.
- i don't want commit changes in
can make many stashes in different branches?
if not, whats alternative stash
?
commit
, revert
commit
option here?
git worktree
git worktree introduced in 2007 under contrib
folder in git repo , called new-workdir
.
for example:
git worktree add <second path>
will create folder on computer allow work on different branch simultaneously.
git worktree
create 2 separate working folders separated each other while pointing same repository.
this allow experimentals on new worktree without having effect on repository itself. in attached image can see there 2 separate working folder both of them using single repo , share content.
here sample on how create new worktree , result of it:
can make many stashes in different branches?
yes can want avoid it. can pop stash different branches 1 stahed sources.
if not, whats alternative of stash?
as explained above - use worktree
is commit , revert commit, option here?
again: explained above - use worktree
Comments
Post a Comment