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 in a 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 in b , switch c, have stash changes in b ==> changes in a gone: overridden new stash.

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:

enter image description here


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

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -