News for hackers. Stuff that matters.
Re:Flight rules for Git by mikro2nd on Tuesday October 16, 2018 @12:06PM (#18230484)
You're probably right. I, though, know just enough GIT to get by. In every case where things have gone seriously pear-shaped, it's just quicker -- like days quicker -- for me just to throw everything to the wind and clone the repo again. Reading up how to do the proper thing a recover will just take me order-of-magnitude longer, and frankly, I don't have the time.

Just think how many person-hours were wasted by that team huddled around the monitor...

GIT: The Swiss-Army Chainsaw of Version Management.

Re:Flight rules for Git by habitue on Tuesday October 16, 2018 @12:20PM (#18230619)
Once you understand a few basic things like the underlying git model, and what the reflog is, you can basically get out of any situation. Totally worth the time to learn, it'll save you a ton of time
Re:Flight rules for Git by bhj on Tuesday October 16, 2018 @02:45PM (#18232036)
The interface should be what saves a ton of time, and should not expose the underlying technical model (especially because that model may change at some point)
Re:Flight rules for Git by habitue on Tuesday October 16, 2018 @03:52PM (#18232627)
I don't think it's reasonable at this point that git's underlying model ever changes substantially. Essentially, it is the interface that's stable over time.

It's also the easiest way to understand git.

You could learn to read by memorizing the shapes of thousands of words without learning the alphabet or how it matches up to sounds. I'm sure people have done it. But the failure mode when encountering a new word is complete and utter bewilderment that this new shape is unfamiliar, rather than a graceful degradation you get if you understand the alphabet. The same is true of git.

Re:Flight rules for Git by zaphar on Wednesday October 17, 2018 @09:28AM (#18238704)
This is funny because the lack of consistency in Git's user interface forces you into memorizing the shapes of specific words (commands and arguments). To spell it's language.

The UI does a remarkably good job of hiding the elegant underpinnings from you.

Re:Flight rules for Git by majewsky on Tuesday October 23, 2018 @04:52AM (#18281802)
> it's just quicker -- like days quicker -- for me just to throw everything to the wind and clone the repo again

In this case, I have a single suggestion for you: Give the following extra arguments to git clone.

  --reference /path/to/existing/clone/ --dissociate
This will download objects from your existing clone rather than from the remote repository, thus saving you a great deal of bandwidth if your repo is appreciably large. Also, this operation is absolutely safe. It will only copy objects over into the new clone that are referenced in the remote repository.