Git pull request - "X and Y are entirely different commit histories"

I cloned a project with --depth 1 and got over the inability to commit my changes by using filter-branch to remove

the prior history (bar the last commit prior to mine). I pushed up my new branch to github and looked

at ‘compare’ between my branch and the former ‘master’.

It informed me that:

There isn’t anything to compare.

master and subdeps are entirely different commit histories.

though the file changes are commited and shown.

I gather this prevents a pull request.

I thought that having the last commit in place would be sufficient to link the end of one branch with the beginning

of another, but this doesn’t seem to be the case. Perhaps then the hash only relates to the changes made and does not encompass the hashes of parent commits?

So is the _entire_ history of a branch required in one’s clone in order for Github to generate a pull request?

Hi @progman1,

Thanks for being here! When you check the git log on your local repository, does it show the correct commit history for this file?

It shows my single commit on a new branch and the last of commit of the repo’s previous history (on ‘master’). so that is what I would expect.

so does anyone know if a complete branch history is an absolute requirement for creating a pull request???

or is it more nuanced than that?

is there no one competent to answer such a question here?

1 Like