GIT: Checkout to other branch without doing a commit or stage the files in the first branch -
i beginner @ git. have file changes , need checkout other branch. clarify file exists in both branches. when checkout git says:
the checkout cannot done because have changes not committed in first branch , these files overridden
other times git allows me checkout second branch without doing commit or stage files in first branch
why git doesn't allow me checkout , why does?
thanks
if there conflicts between changes , branch, git reasonably refuse clobber 1 or other. way around stash changes, apply stash (assuming wanted changes in newly checked out branch):
> git stash save > git checkout <brannchname> > git stash pop
Comments
Post a Comment