Is There A Problem With ‘git pull’?

1 mainThis post is specifically about a particular command in git. If you are new to git or don’t know what git is, then this post may not make much sense to you. Now that the statutory warning is out of the way, let’s carry on. This is actually a continuation of my previous blog post. The command we are going to talk about is ‘git pull’. This command that brings the changes in the remote repository to where you keep your own code. This is done by bringing the local copy of the remote repository up to date first, and then merging the changes into your own code repository and possibly your working copy. A lot of people use it very frequently without thinking about the possible side effects. When I first started out with git, I didn’t really concern myself with these side effects either. But programming purists would say that ‘git pull’ is risky and should be used with caution. Why is that?   Continue reading

git fetch vs git pull

1 mainGit is one of the most popular version control systems available out there. If you are a programmer, you must have used it one time or the other. This post deals with a couple of specific commands. So if you are new to git, this post may not make much sense to you. Git offers a variety of powerful commands to control the source code and collaborate with your peers on software projects.Every time I have to tinker with git, I tend to learn something new. In this post, we will discuss the difference between ‘git fetch’ and ‘git pull’.   Continue reading

How To Use DiffMerge

mainTo people who don’t know what merge conflicts are, they are these magical things that make our life pleasant when we are coding in a group. Okay that was a joke! Too subtle? Anyway, when you are working in a team on a central code base, multiple people might end up modifying the same thing, which usually results in a conflict. Merge conflicts are bound to happen when you are working in parallel with a team of developers. If it hasn’t happened to you yet, then you haven’t been coding long enough. Most of the version management tools try to manage this automatically. If people are working on different things that are independent of each other, then there will be no problems. But unfortunately, we are not in utopia. Here on earth, conflicts happen all the time.   Continue reading

Git Is Gone In OS X Mountain Lion

gitThis blog post is for a very specific group of people who cared enough to notice that git command line tool is not working on their brand new MacBooks with Mountain Lion! If that sentence didn’t make sense to you, then you are probably at the wrong place. I got my new Mac last week and I wanted to clone some code from Github. So I opened the terminal to clone it and behold, “git” is apparently not a recognized command! I have already installed the latest developer preview of Xcode (version 4.6 DP3), so what went wrong here? It turns out that we need to manually install the git command line tools. We still live in a world where git is not an integral part of all the systems! Xcode 4.6 doesn’t install the command line tools by default, and Git is one of the tools included in these command line tools. Anyway, there’s a simple fix for it.   Continue reading