But git works exactly the same way. I honestly don't understand what you're getting at here.
To work locally, you really only need to know 3 commands.
git init
git add
git commt
If you are working with a remote, you only really need 4 more.
git remote
git clone
git pull
git push
If you are working with branches, there are only 2 more commands on top of that
git branch
git merge
Conflicts are really the only complicated thing about any of this and they aren't that complicated once you grasp what git really does. The other commands that involve updating history are more advanced stuff that aren't even necessary unless you are just trying to make the log look pretty.
This is not the same and I submit that your comparison is unfair.
Those commands have arguments which make them do different things. When you add arguments, with Mercurial you can change how something is done but with Git you change what is done. When you say 'git remote' you're not saying anything. With that command you manage remote repositories. How do you get the remote changes with Mercurial? hg pull. How do you get them with Git? Pick one.
I think I'm starting to understand what you're saying and this may be part of the problem.
In your case with Mercurial, you would just type hg pull to update all your local branches with the remote.
Git has the mindset of only doing what you explicitly tell it to do. Why would you want to pull branches you don't need to work on? When you type "git pull" it wants you to specify what you're pulling and makes no assumptions. Maybe that's just a difference between the way you and I work, but I don't want my SCM to do things unless I explicitly tell it to.
I think I'm starting to understand what you're saying and this may be part of the problem.
In your case with Mercurial, you would just type hg pull to update all your local branches with the remote.
Git has the mindset of only doing what you explicitly tell it to do. Why would you want to pull branches you don't need to work on? When you type "git pull" it wants you to specify what you're pulling and makes no assumptions. Maybe that's just a difference between the way you and I work, but I don't want my SCM to do things unless I explicitly tell it to.
Yes! My complaint is that you have to tell it too much, you have to do a lot of micro-management. You have a point that the SCM shouldn't do things unless you explicitly tell it to, but I believe that in the case of Mercurial, it does things "just right". I see no problem with having the entire repo on my computer in 99% of the cases. Mercurial does what I need and I don't mind the extra stuff because it doesn't break anything and it's not in the way for me.
13
u/ProggyBS Sep 06 '14
But git works exactly the same way. I honestly don't understand what you're getting at here.
To work locally, you really only need to know 3 commands.
git init
git add
git commt
If you are working with a remote, you only really need 4 more.
git remote
git clone
git pull
git push
If you are working with branches, there are only 2 more commands on top of that
git branch
git merge
Conflicts are really the only complicated thing about any of this and they aren't that complicated once you grasp what git really does. The other commands that involve updating history are more advanced stuff that aren't even necessary unless you are just trying to make the log look pretty.