Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> - getting a clear status of you repo so you know where you are and what you do;

Me repository?

What's missing from `git status' and `git show-branch'?

> - figure out which one of the various method of undo you need for this specific screw up;

It's not hard. The hard part is to acknowledge that you actually need to understand git's internal data structure. All the rest is very easy, up to and including `git reset --hard'.

> - find a practical way to compare this particular version of a snippet with another particular version of a snippet, and work on the result;

I didn't understand what you mean.

> - merge the terrible mess you coworker rush-pushed to avoid to be the one to have to merge;

Me coworker?

And I again didn't quite get what you mean. You'll have to merge anyway. And it's not specific to git, it was the case for any and all version control systems.

> - rediscover the arcanes required to save only what you want. Maybe I should branch and commit. Or stash. Or reset and add. Or do an interactive thingy ?

What arcanes? It's quite simple thing, especially if you learned how git works.

> - survive a rebase with squashing;

`git tag my-old-head' and work until you're satisfied? What's difficult in that? (Apart from the fact that you need to understand how git works)

> - use the history, trying to look for clues of what the heck is going on with the current version of your code.

How is it specific to git? It was the same for any and all version control systems.

> - setting up those damn editors, viewers, differs, etc.

I didn't set anything up, apart from colours used. Or maybe you're talking about $EDITOR/$VISUAL, which you need for many other console tools anyway?

> [...] every time I go back to give a Git training session, [...] I also have to provide such a long cheat sheet it's not even funny. And it's useless before each student perfectly understand what's going on anyway.

Maybe because you're teaching them the wrong thing? Git's data structure is a quite simple thing, it should take half an hour to teach. And with understanding this structure, it's impossible to get yourself into such a mess that you couldn't dig yourself out.



I think you're missing OPs point. A git repo's history shows changes to the source code but not necessarily underlying git usage patterns since many git operations don't live in the history.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: