[#TFS #GIT] HowTo: Work with TFS and Git (III) branches in GIT


  1. Introduction and working model
  2. How to install GIT using Visual Studio 2013


Let’s go with the 3rd part of this series of TFS and GIT. Today I’ll try to talk a little about branches in GIT. If you know how to work with Branches in TFS or SVN, so better you forget what you already know, like Spain > Git is different. The main thing to keep in mind at this point is that the branches are “cheap”, very fast and very fast in GIT. As I have seen people working with GIT, they tend to create branches per developer; and while the Convention depends on each, normal often something like USERNAME / TASK .

And Yes,’ve seen you clear, create branches for every task! I repeat one more time, working with branches in Git is very fast, they do not occupy many resources, and is quite agile. From here the Branches in Git respect everything you already know, merge, branch, etc.

Now, once there is a GIT repository, branches must reside in one repository. When you create a repository from scratch, the main branch that is created is the MASTER. Again, tastes and colors for everyone. Some people use it as a stabilization branch, other uses this branch to consolidate DEV and RELEASES, others use it as the trunk of SVN, and… well your choice.

Another interesting thing to keep in mind is something that struck me was the first day that the vi: CHECKOUT ALL in a BRANCH. (git checkout). This seems a little “hardcore”, however the core of the issue is in the models of publication of Git: commit and publish. These 2 actions are different between them. IE: is possible for a developer to do a commit all the changes in a branch of his local repo, and at some point he can choose to make a push to a branch of the external part of the changes he made. Here we see that in GIT commits are incredibly common (here I make a personal review must, because I know that the command there is git stash, but I don’t have very clear in that working models could be useful to me).

As well, this has not been a review on working with branches, but rather the differences that I found myself, working with them on Git and living in the world of TFS.

PD: If you don’t know the recommendations for working with branches in TFS, because the Visual Studio Team Foundation Server Branching and Merging Guide is for you!

Greetings @ Caparica (Portugal)!

The Bruno


Leave a comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: