Entrance into Git for .NET Developer

image1312-469x194.png

 

 

 

If you want to be hip at the Source Control administration you have to take a look on Git or other peripheral Source Code administrations. Git is the most celebrated agent. That the subject DVCS (peripheral version administration) will be Mainstream in the world of .NET world is a fact since the comment of Brain Harry to the next TFS (responsible for the TFS at the Microsoft Corp.):

“I’m certain that about this time, I bunch of people are asking “but, did you implement DVCS”.  The answer is no, not yet.  You still can’t checkin while you are offline.  And you can’t do history or branch merges, etc.  Certain operations do still require you to be online.  You won’t get big long hangs – but rather nice error messages that tell you you need to be online.  DVCS is definitely in our future and this is a step in that direction but there’s another step yet to take.”

image1313For this blogpost it is important, that I only started working with Git so it’s possible that some facts aren’t true. But of course you are welcome to adjust me in the comments below. If you need some more help than take a look at the help side of GitHub.

So let’s have a start….

Git – what do I need?

As client for windows I recommend msysgit. Important tool there is Git Bash. It’s possible to install a GUI but to say the true, I didn’t get how it works and the instructions are done with the Bash.

For playing around it’s a good idea to create a Repository on GitHub or Google Code (Google Code supports Git as well). I’ve created a Repository on both services and in my opinion GitHub is more elegant and offers a lot of help for beginner.

Introduction to GitHub

GitHub offers a great help which adopts you the subject step by step. From the setup of the client…

image

… to the creation of the first repositories:

image1319

Important Initial instructions

In the last Screenshot you can see the first instructions for a first “Checkin” (in TFS language):

First you create a folder named “BizzBingo” and after that you start the initialization with “git init”.

In the folder there is a hidden “.git” folder – that’s where the mainly magic with the version administration happens. A file will be created and added via “git add.” And you da a “git commit – m ‘First’!” . Now we add it via “git remote…” to GitHub an push it at the end via “git push – u origin master”.

Now it’s visible at GitHub (in the example it’s a readme file).

Introduction at Google Code

In fact it’s not that different at Google Code. Here it starts with cloning the Repository. With this the “.git” folder will be placed in the directory.

image

Add files

I’ve copied files into the directory. Via “git add.” All files in the directory will be added to Repository.

Now the order “git commit –m “COMMENT” appears – But be careful if you call git commit VIM appears and asks you to insert a comment:

image

Press “I” for the Inser-Mode and enter something now “ESC” and “:wq” I recommend you the “-m ‘Comment’” parameter.

Go on trying …

Like I’ve said before I recommend you the GitHub Help Side. If I found out something new I will let you know Zwinkerndes Smiley

Download Git Client for Windows

Create Repository on GitHub / GoogleCode


If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

About the author

Written by Code Inside Team

Learn more about our team.

One Response

  1. I have found nothing to like about GIT. Its command line interface is horrible (what decade is this again?) and the GUI tools work sporadically at best [On windows anyway]. I have not had as much trouble with things getting messed up (bad merges, ghost changes etc) since the days of CVS.

    Reply

Comment on this post

Recent Posts

  • Automated Security Analyser for ASP.NET websites

    Evil Hackers are lurking everywhere and many Web-applications are delicately and share “too much” with the attacker. A quick (first!) overview offers the Tool “ASafaWeb”. All the website does is making a few requests and writing an Analyses including problem solving’s. There are no permanent disadvantages (bad requests/ DoS attacks and so on). Example: KnowYourStack.com ...

  • image1489-570x194.png
    „Sign in with Twitter“ for your own ASP.NET WebApp

      “Sign in with Twitter” is a popular practice to authenticate the users on your website. One advantage compared to an own registration is the lower inhibition for the user. But on the other hand Twitter doesn’t fess up with all the information’s and you will get into a kind of addiction. At the end ...

  • image1485-570x194_thumb.png
    CodePlex is going to be updated

      CodePlex the Microsoft Open Source Project Hosting Plattform hasn’t changed that much in the last few years and for a few times I thought Microsoft stopped the whole developing process. But now I found out that there is still life in the project. Maybe it is because of the success of GitHub or because ...

  • image1474_thumb.png
    What does Adobe in the flash-free web? Magazine-Style Layouts with CSS Regions!

      Adobe is well known for Photoshop and Flash but of course there is a lot more. According to the “Future Post” from Google Adobe declared one of their big subjects on a Blogpost. I’m talking about the W3C Working Draft to CSS Regions. Adobe cooperates with the WebKit Team and W3C on this. What ...

  • image1471-523x194.png
    HTML 5 Games, Tooling & 3D

      Game Developing is an interesting subject for all kind of software developer. But as a web developer without any Flash-skills there aren’t that much starting points. With HTML5 and the combination between Javascript, CSS3 and fast browsers there are the first “robust” HTML5 games. HTML5 games? Is this real? Neowin created a “Top 10” ...

Support us