monmouth-college-cs / sddc-reading-notes-monmouth-college-comp-335

sddc-reading-notes-monmouth-college-comp-335 created by GitHub Classroom
0 stars 0 forks source link

What to do if two branches are different histories? #37

Closed phein closed 5 years ago

phein commented 5 years ago

I asked about this the other day but I forgot how to do it. Do I fetch from remote first and then branch from emptybranch?

jlmayfield commented 5 years ago

If the problem is you can't do a merge because the history is different, then yes, fetch+merge or pull the remote branch into your local, then re-push that. You might still need to do some manual fixes.

If your problem is it won't even let you attempt a PR because the histories have nothing in common, then you need to pull the base branch from the remote (probably emptybranch here), then add your files to that branch, commit, push, and initiate at PR.

jlmayfield commented 5 years ago

This StackOverflow Question discusses strategies for checking out single files from other branches.

davidhsonic commented 5 years ago

@phein did you see #35?

jlmayfield commented 5 years ago

I'm guessing you got this worked out @phein ? If so, go ahead and close the issue.