Master HEAD has a few changes and I’m trying to merge my current local changes with the Head.
Suppose I have conflicting changes. git just refuses to pull.
It says I have conflicting changes, so in this case I expect it to tell me the files that have conflicts but it expects me to revert my local changes and then pull
Master
/ \
branch1 branch2 (local)
\
Master
When branch2 tries to commit changes to master fails. What should I do in this case? Manually copy files to some location, pull and the then use winmerge to merge the files? or is there a better way to to merge?
When I do a git pull, it states that – local changes will be overwritten, so stash or commit the changes before pull.
When I stash or commit the changes, and then pull stash pop fails stating that the changes in working copy will be overwritten.
BTW, I never see a file with conflicts in either of the cases, even when I try a rebase.
Looks like the best way to work with GIT is have branches.
Branch 1
GIT Commit
GIT PUSH
GIT MERGE master ( to fetch the newer changes)
Branch 2
GIT Commit
GIT PUSH
master
GIT Merge branch1
GIT Merge branch2
I dont think there any other way. Please correct me if i am wrong?
Is this correct, If yes, in this case working with branches is smooth!