Skip to content

Git Push example needs correction #16

Open
@GollyTicker

Description

Thanks for creating the nice pictures. I have looked at them and they're helpful - except for one case, where I'm sure that the information is incorrect.

Considering this explanation for git push
img

I see, that the left example does not fit with my experience and understanding of Git - and reproducing the setup with a small repository I get push rejected for the final git push -u origin tabby instead of a successful push.

This makes sense, because the tabby branch has different histories locally vs. remote. Locally, tabby has cat -> cat with bow tie -> cat with bow tie and stripes. Remotely, before the push, origin/tabby is cat -> cat with stripes. The last cat with stripes commit never existed locally, hence the push will not work. Merges are only possible locally and not on remote.

Do be correct, the lower drawing needs to:

  • have the was origin/tabby text point to cat with bow tie
  • draw a line from cat with bow tie to the new cat with bow tie and stripes
  • remove the cat with stripes entirely and all of it's lines

What do you think?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions