Git is a Harrier Jump Jet. And not in a good way
reprog.wordpress.com
reprog.wordpress.com
Can't commit like you expect?
git commit -a
Alternatively stage a commit git add filename
#then commit it
git commit -m "commit message"
worst Git’s just version control.
As I recall version control is pretty important to the software developer toolbox. I know its pretty important to mine.If it takes you that long to get up and running with Git, I can't imagine what kind of developer you are.
Edit: I should add an addendum to this: I don't mean this as a personal attack, I'm just kind of incredulous about all this talk about version control is hard. I have used cvs, svn, mercurial and git and I never found them particular hard to get up and running with them. All source control has its pain points, but usually getting started on a project that has already been using it, or a new project isn't one of these points.
Me: Why? I already added them before, why do I need to add them again?
They: You just do, OK?
The answer isn't "You just do," neither is it complicated. You need to re-add files after you've further modified them, because you aren't adding files, you're adding changes to files at the time you added it.After all, why should your VCS assume that your file layout consistently and meaningfully aligns with your changes? I've found it's much more meaningful to cut up a body of work into several commits after the fact using a tool like GitX.
Kidding aside, arguments like this just do not hold water. If the tool doesn't fit your needs profile, use something else.
The guy who dedicates three posts to loop invariants and formal (ish) reasoning practices thinks git is hard?
I feel like this post is from some kind of bizarro-world. Even more so since I'm reading on my phone, so there are no sushi pictures!
Further, the tendency of some developers to bitch about using any tool outside their comfort area is annoying. Guess what, users of open source software: unless you're programming using assembly, you use the tools you do because people decided to try something a little bleeding-edge, adventurous, and new. The idea that developers should always "stick with what works" and resist change (even if they don't always like it) is kind of freeloading. Some day, the tools one is using now will be obsolete for the purpose it's being used for now. Be ready to accept change.
That said, the OP should try Mercurial if he wants something with a slightly shallower learning curve.
Almost every time I learn something new about git, it is something that is immediately useful.
It is perfect for little "6 file projects". Try getting started so quickly like this in CVS or subversion:
git init
git add .
git commit -a -m "My own repo"
Bam, done. Now you can just do git commit -a whenever you need to add something new. Sure, the index might feel strange to some people, just skip it with -a. [alias]
cam = commit -a -m
Then you can just type 'git cam "look what I changed!"'But internally Git is incredibly simple and well designed. It just needs some polish to make all common use cases intuitive for the casual user. The UI should always guide the user how to proceed in unclear situations. Common use cases should have simple shortcuts, instead of requiring 2 or 3 separate commands.
Git can get complicated later on, when you are doing complicated things. But on easy things, git is easy enough.
(And so are darcs and mercurial and the other modern version control systems.)
I have definitely done occasionally awesome things, like amending commits with small noticed typos before pushing, stashing is totally awesome, cheap branches are mostly convenient. But there's _so many_ layers, and nothing (that I've yet discovered) that lays it out in a manner that makes it easy to understand.
I've a lot of past experience with Subversion. I used SVK for a while, so I could get local dev branches and commits without pushing to the central repository. But git continually confuses me. Plenty of it is un-learning other VCSs (no, to get rid of that mistaken change, I don't revert the file, I checkout the file. revert is a command but it does wholly other things.) Not to mention the many names for things. Local, staged, cached, indexed?
Yowza.
Really, at its core, git is incredibly simple. That's one of the reasons that it's hard. It's just a DAG of changesets, and every command lets you manipulate that graph, or give points on the graph names.
Anyway, I'd echo several people's sentiments here: http://progit.org is a really good explanation, and also fairly short.
The good news is that as more people flock to Git, they'll create better tools. Look at some of the wonderful things people have created for Subversion; for instance, the beautiful Mac client Versions, which is aimed at web designers rather than programmers. There's no reason something similar can't be built for Git. The average user shouldn't have to use the command line. Once those tools are in place, it won't matter how unintuitive Git's terminology is.
Instead, all it provides is one, single, minor example of a potential issue: you can't commit the same way as CVS or subversion.
Not sure why it took the author so many words to get around to saying that. And if there are other problems with git, I'm not sure why the author doesn't mention them.
I can tell you read it reaaally carefully.
These complaints could only come from someone who has used CVS/svn in the past and expects git to work exactly the same way.
Are there any extant articles of someone who has never used source control at all before having these problems with git specifically and not other SCMs?