First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

Entity Framework 4.3.1 Migrations and non English locale

A few days ago I started migrating a web app I was working on from ASP.NET MVC 3 and EF4 to ASP.NET MVC 4 and EF 4.3.1. All went well, except for some problems with the automatic generation of the DB scheme using EF Code First: it was creating the database, but no tables and not even the __MigrationHistory table added in 4.3; and during the execution of the schema generation an error was raised with a weird datetime conversion error. I tried this both on SQL Express 2005 and SQL Compact and I got the same outcome, just different errors.

In SQL Express 2005 I got:

Conversion failed when converting datetime from character string.

In SQL Compact I got slightly more helpful error message:

The format of the specified date or time datepart is not valid.
[ String = 2012-04-19T13.21.04.364 ]

The cause of the problem

A bit of Googling, and I found out that this problem is related to how the __MigrationHistory is created and filled in with rows: for every “migration” a new row with, among other info, the timestamp of the migration is added.

INSERT INTO [__MigrationHistory] ([MigrationId], [CreatedOn], [Model], [ProductVersion])
VALUES ('201204231416585_InitialCreate', '2012-04-23T14.16.59.038Z', ...., '4.3.1')

The problem is that, probably due to the local of my local machine (Italian) and of my test database (French), the format in which the datatime value has been serialized was wrong: instead of 2012-04-23T14.16.59.038Z it should have been 2012-04-23T14:16:59.038Z

I asked the question on StackOverflow but even there nobody was able to find a solution for the problem, but at least a guy from the ADO.NET Team looked into it and, a few days later, came out with a solution.

It’s a bug in EF

The answer is that it is a bug, as they didn’t specify InvariantCulture when they do the ToString of the data to generated the SQL script. And it will be fixed in the next version of Entity Framework. But until it comes out, and you encounter the same bug, here is how to fix it.

The workaround

First thing you have to do is specify a custom SqlServerMigrationSqlGenerator, override the Generate(DateTime) method which the one responsible for generating the value of datetime objects, and specify the InvariantCulture option and the correct colon based format.

class FixedSqlGenerator : SqlServerMigrationSqlGenerator
{
    protected override string Generate(DateTime defaultValue)
    {
        return "'" + defaultValue.ToString("yyyy-MM-ddTHH:mm:ss.fffK"
                      , CultureInfo.InvariantCulture) + "'";
    }
}

How to inject the workaround

Then you have to configure EF to use your new migration generator instead of the default one. Where to put this configuration depends on what you are using.

Using Migrations

If you are using the Migrations it’s pretty easy: just call the SetSqlGenerator method in the Configuration class for the migration.

class Configuration : DbMigrationsConfiguration<ConsoleApplication3.BlogContext>
    {
        public Configuration()
        {
            AutomaticMigrationsEnabled = false;
            SetSqlGenerator("System.Data.SqlClient", new FixedSqlGenerator());
        }
    }

But bear in mind that this works only if you enabled migrations.

Using Code First

If instead, like me, your are just using Code First, and just want your DB automatically created (and then updated) you’ll never go via that configuration step, so the first automatic migration will not use your new Sql generator. Another small step is needed: you have to tell EF where the Configuration is:

Database.SetInitializer(
   new MigrateDatabaseToLatestVersion<BlogContext, Migrations.Configuration>());

Where to put this line really depends on the hosting application: you can put it in the Context class, at the beginning of your console application, or in the Global.asax.cs file in a ASP.NET MVC application.

More info

If you never used EF migrations I really recommend you play around with them: it’s a really neat way to keep track of your database, even if you are not using EF as your ORM. Here are two very nice blog posts from the ADO.NET EF team that show how migrations work, but in automatic and manual manner.

And finally I’d like to thank Brice from the ADO.NET EF for quickly responding to the issue and sending me the workaround.

Announcing the Web.NET Conference Europe, this fall in Italy

webnetconftitle

The web is evolving, and so are the techniques, technologies and frameworks used in web development. Together with Ugo Lattanzi we are organizing the Web.NET Conference Europe, this fall, in North Italy.

Logistics is not 100% certain yet: it will be in North Italy, probably in Milano, and will be this fall, probably toward the mid/end of October.

What is sure, instead, are the topics: Advanced JavaScript frameworks, REST frameworks, Cloud, lightweight http servers, real-time web, low-ceremony web frameworks, both in .NET and in other technologies.

We’ll probably launch a call for speakers around of May/beginning of June, but if you already have a idea, start thinking about. We are expecting a European audience, so all talks should be in English.

To get an email when things becomes more defined you can register on the launch page of the conference, http://webnetconf.eu. You’ll get a personal sharing URL with which you can help us share the good news, and get in return pre-emption right on the seats available, and might even win a free event t-shirt.

We also have a twitter account, @webnetconf, and a facebook page, and the hashtag for the conference is #webnet12

Now some background on how this conference came to existence: organizing conferences takes a lot of effort, especially if done with little help, and the organization of that last conference left me without strength. That’s also one of the reasons why UGIALT.net had its last conference this January. But during and after that day I had many people asking me why we quit, that the conference was the best conference they’ve been ever, and that the community still needed a objective view on the .NET development. I was a bit reluctant at first, but all that messages, and the active push of Ugo Lattanzi made me change my mind. And so here I am again, organizing another conference.

Using github behind a firewall

If you are behind a firewall that blocks port 22 you’ll not be able to access github using the standard procedure described in the Set Up Git help page.

If you are looking for more introductory information on using github and git I recommend you read my other post on Getting started with Git and GitHub.

When trying to login to github over ssh you get this error if you are behind a firewall that block port 22.

$ ssh -vT git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: connect to address 207.97.227.239 port 22: Attempt to connect timed out
without establishing a connection
ssh: connect to host github.com port 22: Bad file number

Luckily there is a solution for that: Smart HTTP. Basically it will use HTTP to pull and push updates to github, thus using the standard SSL (443) port instead of using the blocked SSH port (22).

Opting in is pretty easy: when cloning a repo just use the https url instead of the git url, for example:

$ git clone https://username@github.com/Haacked/Subtext.git

If instead of cloning a repository you are creating a new one you have to specify the https instead of the standard git one:

$ git remote add origin https://username@github.com/username/project.git

But it’s not done yet: using SSH the first time you connect to github you get a message asking you to validate the SSH certificate of github. Unfortunately this does not happen when using SSL. The only thing you get is this error message:

$ git push -u origin master
error: SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
verify failed while accessing https://username@github.com/username/project.git/info/refs
fatal: HTTP request failed

This means that the SSL certificate is not trusted. You could either manually install the certificate or simpler just tell him not to verify the HTTPS certification:

git config --global http.sslVerify false

HTH

Tags: , , ,

The “modern” ASP.NET web stack is fully opensource: ASP.NET MVC, Web API, ASP.NET WebPage and Razor

Still getting my head around this early morning (in Europe timezone) announcement on ScottGu’s blog: ASP.NET MVC, Web API, Razor and Open Source.

Some of you might remember that almost 3 years ago the announced that ASP.NET MVC v1 was being released under the MS-PL license, thus making it opensource. That turned out to be just a source snapshot of each public release, and were not accepting contributions, so, a “partial” commitment to open source.

This time is different: the source code is available from the “live” repository the ASP.NET team is working on, and they are going to accept pull requests (if of course the quality of the submission is good and it adheres to the roadmap for the release). And it’s not just ASP.NET MVC, but also the WebAPI, the Razor view engine, and ASP.NET Web Pages.

This means that one can build the frontend part of a web site/web application with Open Source libraries from Microsoft or officially supported by Microsoft (like jQuery, jQuery UI, Knockout.js, JSON.net, upshot). To make it complete the system.web dll would have to be opensourced as well, but that would mean the whole .NET framework should be opensourced.

Now some links:

Now go take your git client, join the 29 people that already forked the asp.net web stack, and submit your first pull request.

Lumia800 bundle unboxing

I wanted to buy a Nokia Lumia 800 for a while now, but since I wanted to buy it for Daniela I wanted to buy the pink magenta version, and I couldn’t find it neither in Italy nor in Belgium. Since I’m now in Bellevue for the MVP Summit, I decided to take advantage of a promotion done by Microsoft Store and buy the Lumia 800 bundle, which includes the Lumia 800, the Purity Monster headphones, the Play 360 speaker and the Luna Bluetooth headset, all for 899USD + taxes (984USD in WA) which is 730€. If you consider the cost of the single pieces, it’s almost 200€ less that what it would cost to buy it in Europe.

6790787724_1e51c9c421

Since I’m flying back to Belgium I had to get rid of the big packaging. I’ve to say that I’m really impressed by the quality of the package, same quality, if not better quality than Apple packaging: pull loops, magnetic covers and similar goodies.

The Unboxing

As I did last year when I bought the Samsung Omnia 7, here are the unboxing pictures. Hope you’ll enjoy watching the unboxing as much as I enjoyed doing it.

First impressions

I haven’t started using it yet, but I just made sure everything was working properly before flying back to Belgium.

Lumia 800

I expected it to be a bit bigger, while it’s smaller than the Samsung and similar in size to the iPhone 4. But there is less “chrome” around, so at the end probably the viewable area is the same. I didn’t activate it, but I played a bit with Nokia Drive and even downloaded the map for British Columbia as next week I’m spending some days driving around the area.

Luna headset

Bluetooth headset, of course pink as the phone: haven’t tried, but the concept looks nice. You go around with that kind of ball in your pocket, and when the phone rings you just pop the headset out of the cradle. Looks like a good compromise between battery life and size. The pairing process was pretty unique too: I popped the headset out and it started to talk, giving instructions on how to pair it. And I paired it with my iPhone, and it worked fine even with that.

Purity Monster HD headphones

Still pink, they come with a carrying case and two cables: one that is specific to older nokia phones, and one that is called ControlTalk Universal, that allows you to pickup, hang up, play, pause and volume. And works also with the iPhone.

Play 360 speaker

Also this one works with the iPhone  and any other Bluetooth audio player. The pairing process was pretty simple too, and would have been even simpler with a NFC device: touch to pair. The speaker is wireless (battery should last 20hr of music) and comes with nice neoprene carrying case.

Chargers and cables

Finally everything is recharged via mini USB, so even if each product has its own cable and power adapter, you need to bring just one around.

Future impressions

When I get back home and get a micro-SIM card I’ll see how the phone works. There should not be US specific version of the Lumia800, so hopefully it will get a good 3G+ signal in Europe. And will post more impressions when I come back.

Tags: ,

Introducing Wijmo, a feature-packed jQueryUI based widget library

Lately I have been evaluating a few JavaScript based UI libraries for both my projects at work and to use for a new version of the bike climbs site called 39x27.com:  it was quite nice to see that almost all component vendors are now embracing, some more than others, JavaScript together with the more traditional Web Controls for ASP.NET Web Forms.

In this post I’m going to briefly cover the reasons why I ended up choosing Wijmo, and then I’m giving a quick introduction on the set of widgets available.

wijmo-horiz_400x125

Why Wijmo?

My first, and only strict requirement was that it had to be based on jQuery: everybody in my team knows it, it is the more used JavaScript library, so new developers and contractors coming are likely to know it, and ASP.NET MVC and the ASP.NET Single Page Application depends on it (see, ASP.NET MVC validation, Knockout.js, upshot.js). That excluded libraries like ExtJS.

All the buzz lately is about KendoUI, a jQuery-based UI widget library developed by Telerik, so it was the first library I looked at: it’s based on jQuery, and is available also with a OSS license (GPLv3). It has lots of widgets, both for web UI element and for drawing charts and they are developing also some mobile UI controls. And it’s use feels natural, looks like jQueryUI: you create a HTML element, you select it via jQuery and then enhance it via a KendoUI specific JavaScript  function.

What I didn’t like is that they reinvented the wheel: one line above I wrote “looks like jQueryUI” because it is not built on jQueryUI; Telerik wrote its own widget core library. This might be ok for people that are using other Telerik controls or are ok with vendor lock-in, but I didn’t like this approach that much: what if I need a widget that is not available? Either I write mine from scratch using the KendoUI core library, or I look on the internet, and include also jQueryUI in the mix, since most likely the OSS widget I find is built on it.

I looked for something else, and my second option was Infragistics jQuery controls: apart from having less controls, costing more money and not having the double commercial/OSS license, it is also built on top of their own core widgeting framework. So, another no-go.

Finally, while discussing my findings on twitter, I received a message from Richard Dudley, a developer evangelist from ComponentOne, which suggested I take a look at their jQuery widget library, named Wijmo. After a quick look at the site I realized this was exactly what I was looking for: a JS control library built on top of jQueryUI. Not only that, but also it has a lot of widgets, including the editable grid, a Google Calendar like planner calendar, a WYSIWYG editor, and also some multimedia elements more suited for frontends rather than backend apps, like image gallery, lightbox and also a HTML5 video player.

The great thing of being based on jQueryUI is that you can use all the jQueryUI themes, and if you need something not included in the library you can include any other jQueryUI widget without the risk incompatibilities between widgeting frameworks.

From the license stand point it is similar to KendoUI: it is available both with GPLv3 license and a commercial license. And a “light” version of Wijmo, including only the basic controls, is also available with a MIT/GPLv2 license, making it usable also in OSS projects that are not GPLv3.

I also wrote a features comparison table between the widgets you get with Wijmo Open, Wijmo Complete, KendoUI and with jQueryUI. (based on Wijmo v2 and Kendo UI as available in February 2012)

Or you can see it in external window.

Getting started with Wijmo

Let’s now quickly see how it looks like developing with Wijmo.

Download the bits

Hit the Wijmo website, and download the JavaScript library: it comes bundled with samples for every widget, complete sample apps, normal and minified version of all the JavaScript files, and all the premium themes. This is the best way to start playing with Wijmo. If you want you can also use ComponentOne CDN and reference all JavaScript files from there.

Referencing the libraries

As said above, Wijmo is based on jQueryUI, which is based on jQuery, so in order to include Wijmo you have to reference all of them.

The easiest approach is using ComponentOne CDN, which provides a minified version of the JS libraries and their CSS.

<!--jQuery References-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"
     type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.17/jquery-ui.min.js"
     type="text/javascript"></script>

<!--Theme-->
<link href="http://cdn.wijmo.com/themes/midnight/jquery-wijmo.css"
     rel="stylesheet" type="text/css" title="midnight-jqueryui" />

<!--Wijmo Widgets CSS-->
<link href="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.0.min.css"
     rel="stylesheet" type="text/css" />

<!--Wijmo Widgets JavaScript-->
<script src="http://cdn.wijmo.com/jquery.wijmo-open.all.2.0.0.min.js"
     type="text/javascript"></script>
<script src="http://cdn.wijmo.com/jquery.wijmo-complete.all.2.0.0.min.js"
     type="text/javascript"></script>

Or, if you want to host the script files locally on your server you can also select the files you just need for your application: you can do that by checking the dependencies of each widget (for example the dependencies of the Rating control)

Adding a Rating control

Let’s see now how add a Wijmo widget to a page: I’ll use a rating control, but the process is the same also for most of the other widgets.

After having added the references, let’s add the HTML element we want to use for the widget: it this case, we can use either a list of radio button, a select, or just an empty div. Choosing a form element makes it easy to store the rating value directly, while if you choose an empty div you have store the value yourself. In this case I’m going to use a select list.

<select id="climbRating">
    <option value="1">Easy</option>
    <option value="2">Average</option>
    <option selected="selected" value="3">Tough</option>
    <option value="4">Very Tough</option>
    <option value="5">Hors Categorie</option>
</select>

Finally, inside a script tag, initialize the rating widget like you would do with any other jQueryUI widget:

<script>
    $(document).ready(function () {
        $('#climbRating').wijrating();
    });
</script>

And you’ll have nice rating control with a reset button to clean the value and tooltips.

step

Fine-tuning the appearance of the widget

Probably you might want to customize the appearance of the rating widget, like removing the reset button, or maybe enabling multiple values per star, or changing the icons  instead of using the stars. To do that just specify the properties when you call the wijrating method:

<script>
    $(document).ready(function () {
        $('#climbRating').wijrating({
            resetButton: {disabled: true},
            icons: {iconsUrl:
                        ["flat.jpg", "hilly.jpg", "steep.jpg",
                        "steeper.jpg", "vertical.jpg"]
                    }
        });
    });
</script>

The editable grid

Let’s see now a more complicate widget: the editable/sortable/pageable grid.

The hook in HTML is simple: just add an empty table if you want to load the data from a JavaScript datasource, either local or remote via JSON, or a normal table with all the data already in tabular form.

<table id="climbsTable"></table>

Then, as usual, via jQuery, you enhance the table by calling the wijgrid method. In this post I’m just going to show the basic features, how to pass local data, and how to enable sorting and some other basic formatting options. In a future article I’ll show how to use it in a ASP.NET MVC application with Web API. This code is taken from a prototype of the new version of a bike climbing web site I’m building with my friend Davide Vosti, called 39x27.com.

$(document).ready(function () {
    $("#climbsTable").wijgrid({
         data: [
            { 
                Name: "Passo dello Stelvio",
                Location: "Prato dello Stelvio (IT)",
                Rating: "Hors Categorie",
                Rate: 0.074,
                Length: 24.3,
                Elevation: 1808
            },
            ...
          ],
          allowSorting: true,
          columns: [
                {},
                {},
                {},
                { dataType: "number", dataFormatString: "p1" },
                { dataType: "number" },
                { dataType: "number", dataFormatString: "n0" }
            ]
    });
});

The first property is called data and is the one that defines how the grid is populated: it could be an array of array, an array of objects (like I did in the sample above) or wijmo datasource if you wanted to get the data from a server.

In the sample I then enabled sorting, and later provided an array of columns: the first 3 are empty because I want to use the default values (header is the property name of the JSON object provided and the data type is string), but in the next 3 I specified the data type and the format of the string: the data formats us the same format of jQuery Globalize, so p1 means percentage with 1 decimal while n0 means generic number with no decimals.

Here is the table with the list of the bike climbs.

grid

All the details can be found in the API documentation available online: Wijmo Grid documentation.

In conclusion

In a few words, what I liked the most about Wijmo is its philosophy of embracing what is already available (jQueryUI) and most likely already well know by developers rather than reinventing the wheel and bringing yet another library in the mix like the other component vendors are doing.

In second instance, what is great is that they provide not just web-apps oriented components like the editable grid or the event calendar or the datepicker, but they also have some great charting widgets and  widgets that can be used also in “web sites”, like the carousel, the lightbox and the HTML5 video player.

You can download the trial and use it in you project, and only when you are ready to put it in production you have to buy the license. So nothing prevents you to try this great component library.

Tags: , , ,

Disclosure of Material Connection: I received one or more of the products or services mentioned above for free in the hope that I would mention it on my blog. Regardless, I only recommend products or services I use personally and believe my readers will enjoy. I am disclosing this in accordance with the Federal Trade Commission’s 16 CFR, Part 255: “Guides Concerning the Use of Endorsements and Testimonials in Advertising.”

TechDays Belgium 2012: a look at interesting sessions

TechDays 2012 Belgium is just 2 weeks away, and it’s time to have a look at the agenda and decide which of the sessions to attend.

My highlights are:

But filling in all the slots was a tough decision, especially in the second day, with lot of overlapping interesting talks (whereas in the first day some time slots were almost empty) but here is my tentative agenda for the 3 days

So, hope to see you there.

The last UGIALT.net Conference

logo_big

Last Saturday it was the 7th and last Conference organized by UGIALT.net. With last I really mean last, as in there won’t be any more conferences organized by UGIALT.net, at least not in its current form.

This is the end

Those who attended know the reasons why we decided to terminate operations, but if you were not there, you can have a look at the keynote’s slides, watch the video of the keynote, or reading the more detailed explanations on Emanuele’s blog post, Perchè UGIALT.net ha chiuso?, or on my Italian blog L’ultima UGIALT.net conference. And for those who don’t read Italian I’ll try to summarize the reasons here:

  • we started (almost 4 years and half ago) with the goal of pushing Microsoft and the other .NET user groups to widen their horizons, and it looks like we succeeded: thanks to the ALT.NET movement Microsoft has become more agile, more focused on good practices and more open to Open Source, and other user groups started to include in their agenda more talks about fundamentals and practices and less “how to use MS XYZ lib”.
  • the ALT.NET movement (in Italy, but also worldwide) kind of split in two groups: the ones satisfied with the direction MS and other traditional user groups took, and the ones not satisfied. The first merged back into the traditional communities, and the latter moved to other platforms (ruby, nodejs and similar).
  • And finally, being too successful, with more than 150 attendees and many “mainstream developers” attending our last conference, we realized that the next step should have been a bigger conference, in a bigger venue. But that wouldn’t have been possible with just the 3 of us organizing it in our (little) spare time, financed just by donations. We should have set up a legal and fiscal entity to sell tickets, get paying sponsors, pay for the venue and either dedicate more time or find someone to help us (which didn’t happen in 4 years). But that’s a direction we didn’t want to take. We hope the other Italian User Groups will follow our steps, and keep on including ALTernative tracks in their conferences.

The conference

As I already mentioned this was the edition that beat all records: the highest number of registrations (more than 240), the highest number of attendees (around 150, the maximum, maybe more, capacity of the venue), the highest value of gifts and prizes for the attendees (more than 60.000€ of commercial value), mainly thanks to Umbraco for its Umbraco.TV subscriptions for everybody, and to Mindscape for the gift to the speakers and the 20 licenses of LightSpeed.

And #uan12 has even been an official twitter trending topic on Saturday in Italy: I think this is yet another record, being the first developer conference in Italy to become a trending topic.

If you couldn’t attend, we published all the slides online on Joind.in: http://joind.in/event/uan12. If you attended please check-in on the event, and leave your feedback.

We also recorded most of the presentations, and they are available on the Vimeo channel of DotNetMarche, one of our two main spiritual heirs, in the 7th UGIALT.net Conference video album.

But a conference is not only technical contents, it’s also user interaction and social media: you can see what happened, or live it again, in the photo twitter wall created by PepperTweet for UAN12.

What’s next?

We pushed the other UGs during these 4 years, now we hope some of them will continue on our footsteps. In the context of .NET I’m pretty sure we’ll see a lot of good stuff coming from DotNetMarche, and outside of the .NET world, there is a very fervent community in Brescia, called WEBdeBS, which is organizing (and has organized) a lot of interesting events.

 407693_3108061259636_1207452102_3374094_2060978480_n

Personally, now I’ll dedicate more time to coding, other interests (like Arduino). I’ll help WEBdeBS and DotNetMarche in some of their activities and will try to start collaborating more with the local (as in Belgian) communities.

What’s new in ASP.NET MVC 4: slides and demo are now online

Today I had my first live webcast for Microsoft Belgium, about the new features released with ASP.NET MVC 4 at Build in September.

There were around 80+ people registered and around 50 people attending, and almost nobody left before the end of the webcast, so I guess it pretty well. We also are aware there were some glitches in the audio during the async part of the webcast: the audio was also recorded directly from the mic, so the video that will be published in the next week on Channel9 will have good audio.

Or just register for the TechDays2012 Belgium next February, where The Gu, besides giving the opening dev session, will give a session on ASP.NET MVC 4.

Here are the slides I uploaded to SlideShare.

Also available for download are:

Video

The video has been published on Channel9: What's New in ASP.NET MVC 4

Some resources

Additional resources to check are:

Not related to ASP.NET MVC 4, but since a few people asked how I got the Lumia 800 skin on my WP7 emulator, here is the link: Windows Phone 7 Emulator Skin Switcher.

If you attended, please let me know how it went, and if you didn’t stay tuned: in a week or so the video will be available on Channel9. I’ll write a new post with the video.

Getting started with Git and GitHub

Now that Subtext, the blogging engine I’m working (or at least I should) on together with Phil Haack, has been officially moved to GitHub (guess the reason why), I finally have a reason to really study git and github.

I already tried starting a few years ago, and even used it a bit lately to work on the ugialt.net conference site (here the conf-oo github repo), but never really studied in depth, and still didn’t fully get the key differences between a traditional source control and a distributed source control.

So I asked around and found some good pointers.

Think Like (a) Git

The most recommended pointer I got is the Think Like (a) Git website, a self-proclaimed “Guide for the perplexed”. It’s a pretty nice tutorial covering all the key concepts of Git.

It also comes with a slideshow and an all-in-one page if you want to print it or PDFize it.

ProGit book and site

The second most popular recommendation I got is the Pro Git book from Apress. The thing that differentiate it from other books is its widespread usage of visuals and samples.

The cool thing is that, while still being a paper book and having a Kindle version, both released on 2009, there is also a Creative Common licensed ebook (PDF, Mobi, ePub) and also available for online reading.

The “code” for the book and his images is available on github and is updated with fixes coming from readers.

Other Git books

But Pro Git is not the only book available. Other two interesting books are the Pragmatic Guide to Git, published by Pragmatic Programmers and Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development, by O'Reilly.

Cheat sheets

Then come the cheat sheets: GitHub lists a few ones.

But I particularly like the one on DZone, which besides being a cheat sheet is also a compendium of the main key points, and one of the first, but still one of the best, git cheat sheet.

Contributing to Open Source Projects On GitHub For .NET Developers video series

UPDATE: suggested by Bobby Johnson in the comments, a series of 3 videos on how to use Git and GitHub for contributing to OSS projects:

The GitHub Flow

One thing is to know the commands and how to use them, another matter is using it with the right approach and workflow.

I found two nice blog posts that explain two different versioning/branching strategies:

  • The usual workflow based on master + develop and feature branches, release branches, hot-fix branches, this time referred to as Git-Flow
  • The workflow used by GitHub itself, which is kind of less formal in some ways (no tons of release-based branches) and more strict in other ways (never commit to master without a code review and a pull request).

One works great if you have a product with formal releases and have the time and resources to manage all that formal branches, the other works great in less formal environment, with continuous deployments, and no formal releases.

Some other useful links

Do you have any other resources to recommend?

This is what I found, and apparently what the most popular resources are. But I’d love if you could add your own findings by posting a comment.