GeekWare - Daniel Pecos Martínez

Git

Recipe: From SVN to Git without pain

Are you already in love with Git? I’m pretty sure of that, that’s the reason why you are reading this, huh? These are the steps you should follow to migrate an existing SVN repository to a Git one: 1 – Create a file where you will map SVN users to Git users, following this pattern: svn_user = git_user This is the one I created to migrate some SVN repositories from Google Code:

Git-SCM (Part 2)

In a previous post, we have seen what Git is and its main characteristics. Now, we’ll go more into detail about its functionality and we’ll see what a usual day working with Git looks like. But before, some initial concepts: Repository: A working tree of files and directories which can be versioned, keeping track of every single modification made over the working tree, been able to move forward and backward in its history. Branch: it is an alternative image of the repository, keeping track of its own history of modifications. A repository has a main branch called master, and it can have an undefined number of branches, some of them may be copies of remote branches and the default name for the upstream repository is origin. The current branch of the working copy can be always referenced as HEAD. Commit: it is a concrete state of a branch, containing the modifications made to the entire working tree since the previous commit in the history, as well as author information and timestamps. It can be identified by its SHA hash, but a name or tag can be associated to it in order to make thing easier. Merge: it is the process of integrating changes or commits of two different branches. This integration is automatically carried by Git, if there are no conflicts between commits. Push: the changes committed in a local branch into a remote branch. These are the basic concepts we are going to use in the rest of this post. Now let’s start with the fun!

Git-SCM (Part 1)

One of the key tools of a software project development is the repository where it’s hosted. During my experience as software developer I have been working with several flavors, such as Visual SourceSafe, CVS, Mercurial, and of course, SVN. But latetly I have found this little jewel called Git. Git was initially developed by Linus Torvalds as a result of an unsuccessful research to replace the propietary SCM BitKeeper, used back in 2005 in the Linux Kernel project (kinda strange that the opensource star project was hosted with a propietary software, huh?). Back then, the ability to freely use BitKeeper was withdrawn by its copyright holder, so Linus was forced to find a replacement for it. He was looking for a VCS with a high performance in the process of applying patches and keeping track of the changes, but he didn’t find any opensource solutions that fitted his requirements, so he started the developement of Git (as he says on Git’s Wikipedia entry, Git was named after himself, because he considers himself an “egoistical bastard, and I name all my projects after myself”; git is the British English slang word for an stupid or unpleasant person).