git - How to merge my uncommitted files with the changes from the repository, within the same branch? -
i have 1 file, say, index.html.
i change line 1000-1200 on file. coworker, working on same branch me, commit changes on line 600-800 before had chance commit , push.
when tried push commit, github desktop mac said head on repo greater head, need pull first. when tried pull, github deskop told me changes on index.html overwrite changes.
i use github, 1 week. never happens when used svn tortoisesvn in past. tried merge changes first uncommitted files, , if can't, show me conflicted lines are, , lines should decided taken version. don't have option in github desktop. don't understand how in git console.
so, how that?
you must stash
local changes, pull
remote changes , unstash local changes onto updated working tree.
any conflicts between changes , remote changes show when git stash pop
.
git stash git pull git stash pop
Comments
Post a Comment