this post was submitted on 29 Jun 2023
309 points (98.7% liked)

Git

2938 readers
1 users here now

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Resources

Rules

  1. Follow programming.dev rules
  2. Be excellent to each other, no hostility towards users for any reason
  3. No spam of tools/companies/advertisements. It’s OK to post your own stuff part of the time, but the primary use of the community should not be self-promotion.

Git Logo by Jason Long is licensed under the Creative Commons Attribution 3.0 Unported License.

founded 2 years ago
MODERATORS
309
Your Git horror stories (programming.dev)
submitted 2 years ago* (last edited 2 years ago) by canpolat to c/git
 

We all have been there... For the beginner it's easy to mess things up. What are your horror stories with Git?

Link to xkcd

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 2 years ago (1 children)

Apparently git let's you push two completely independent histories into one repo if you force push and will happily let you go about your business until you try to merge.

I found this out when an intern copied the code, initiated a new repo, worked off that repo, force pushed into remote, kept working on his branches. Absolutely not his fault, he should have had help. But I had to edit history and rewrite the parent of a commit to unite the family lines!

Fun to learn that you can create that problem and also there's a "way" to fix it.

[–] JackbyDev 2 points 1 year ago

I believe I remember reading that in the official git repository a totally orphaned branch got merged. So if it can accidentally happen to the official team then I totally buy this.