Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Push example needs correction #16

Open
GollyTicker opened this issue Sep 12, 2022 · 4 comments
Open

Git Push example needs correction #16

GollyTicker opened this issue Sep 12, 2022 · 4 comments

Comments

@GollyTicker
Copy link

GollyTicker commented Sep 12, 2022

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?

@GollyTicker
Copy link
Author

@girliemac What do you think about this?

@GollyTicker
Copy link
Author

@girliemac Hi. Since the explanations are popular I think it's important that they are also correct. Could you please respond to this issue? 😊

@girliemac
Copy link
Owner

@GollyTicker Thank you so much and apologies for not seeing your comments sooner.
I oversimplified the diagram by not explaining the local state on the particular drawing. It has been years since I originally created it so I do not 100% remember precisely what I was trying to achieve at that time. But, I think this one was made as a sequel of the merge and rebase doodles, so you are right, it doesn't make sense if somebody only sees this doodle without the previous ones.

I need to somehow edit this physical drawing on paper without making it messy!

Thank you for pointing this out 😺

@GollyTicker
Copy link
Author

Theoretically you could edit the image via Photoshop and co. Otherwise I'd would make most sense to redraw these pictures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants