6 ms·
I really liked your "Git in 600 words.[1]" I think it will help clear up some confusion for some of my VCS wary colleagues. 1. http://maryrosecook.com/blog/pos
by Procrastes 12y ago
I really liked your "Git in 600 words.[1]" I think it will help clear up some confusion for some of my VCS wary colleagues.
1. http://maryrosecook.com/blog/post/git-in-six-hundred-words http://maryrosecook.com/blog/post/git-in-six-hundred-words
- throwawaymsft 12y agoNot to be rude, but I'm baffled why a professional programmer could be "wary" of using a VCS. Or is it just git in particular? (More understandable, there's a learning curve, but nearly every major project is using it. Git's proven itself.)
- jerrysievert 12y agoi once took a leadership position at a small company that had a longtime contractor building one of their core web products out of foxpro. he refused to use any VCS, proclaiming that "version control is for the weak". needless to say, he didn't last very long.
- test1235 12y agoHe didn't last very long because he didn't agree with you? 'cos clearly whatever he was doing was acceptable up till that point.
- toolz 12y agoThere's no real opinion being given here. That would be like suggesting a general contractor on a new home was fired for difference of opinion, when the reason was he just didn't have insurance.
- throwawayaway 12y agogit checkout <branch> where did my changes go?
- knicholes 12y agoThey're still right where they were before you switched branches unless you've committed them before you switched branches, of course!
- throwawayaway 12y agomkdir commadir cd commadir git init echo "dog" >> dog.txt git add . git commit -m one echo "dog" >> dog.txt git add . git commit -m two echo "dog" >> dog.txt git log git checkout dog.txt cat dog.txt how many dogs in dog.txt?
- bryondowd 12y agoThat isn't "git checkout <branch>", it is "git checkout <file>" If you try checking out another branch while you have uncommitted changes, git will tell you to commit or stash your changes before changing branch. I can certainly understand the danger/confusion there, though. Using checkout on a file reverts the file to a committed state. But the grandparent was referring to checking out a branch, not a file, which is safe.
- throwawayaway 12y agogit checkout <branch> * has the same behaviour. does it not? I left out the asterisk as I was working from memory.
- Igglyboo 12y agoNone of those changes will be lost or overwritten. So, no where?
- fryguy 12y agoExcept that `checkout` makes the working copy match the target branch, which destroys the pending changes in the working copy, if a path is specified. It's the same as `revert` in other version control systems.
- recursive 12y agoI think it's git in particular. Git can seem like it has more complexity than is necessary for a version control solution for some arbitrary "simple" project.
- greggman 12y agoMy favorite "how it works" article is The Git Parable http://tom.preston-werner.com/2009/05/19/the-git-parable.html http://tom.preston-werner.com/2009/05/19/the-git-parable.htm...
- willsentance 12y agoI always recommend this: http://nvie.com/posts/a-successful-git-branching-model/ http://nvie.com/posts/a-successful-git-branching-model/ Not exactly a 'how it works' article, more how it can work really well
- chx 12y agoMy favorite Git tutorial is http://www.sbf5.com/~cduan/technical/git/ http://www.sbf5.com/~cduan/technical/git/ > you can only really use Git if you understand how Git works. Merely memorizing which commands you should run at what times will work in the short run, but it’s only a matter of time before you get stuck or, worse, break something.
- deleted 12y ago[deleted]