Working with branches in git is easy. That's not saying there's some powerful, more advanced commands for complicated branching scenarios. This git branching tutorial demonstrates the basics and those advanced commands you may not even be aware of - worth a play if you've got 30 mins spare.
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult."
Tuesday, 21 May 2013
Git branching tutorial
Tuesday, 16 October 2012
My standard .gitignore file for .Net projects
Thumbs.db *.obj *.exe *.pdb *.user *.aps *.pch *.vspscc *.vssscc *_i.c *_p.c *.ncb *.suo *.tlb *.tlh *.cache *.ilk *.log [Dd]ebug*/ *.lib *.sbr obj/ [Rr]elease/ [Dd]eploy/ _ReSharper*/ [Tt]est[Rr]esult*/ [Tt]est-[Rr]esult*/ [Tt]emp/ [Pp]rerelease/ [Ll]ogs/ UpgradeLog*.XML _UpgradeReport_Files/ bin !SharedLibs/NUnit-*/bin/ !SharedLibs/NUnit-*/bin/net-*/*.exe
Thursday, 24 November 2011
One Git Clone to Rule Them All
git clone --recursive REPOSITORY_URL -o REPOSITORY_ALIAS
- --recursive - Gets the submodules too
- --o - Sets an alias for remote repo rather than defaulting to origin (useful when working in teams)
Monday, 16 May 2011
Getting to grips with Git
- clone - get the source code from your remote git repository
- Make your changes
- commit - commits your changes LOCALLY (not the remote git repository)
- push - commits your changes to the REMOTE repository
- clone - get the source code from the remote git repository
- branch branch-name - create a branch branch-name
- Make your changes on your branch
- commit - commits your changes LOCALLY (not the remote git repository)
- push origin branch-name - commits your changes to the REMOTE repository
- checkout master - switch to the master branch
- merge branch-name - merge the feature branch into the master
- commit and push !!!
At the moment I'm still working with the bash but I occasionally use TortoiseGit for windows explorer integration and Git Source Control Provider for Visual Studio GUI integration.
Wednesday, 23 February 2011
Git First Impressions
So far, so good :) Took me just under half a day to set up a git repository, import the existing project source and update our CI server. GitHub works well for creating your repositories and walks you through the process. It's very quick, especially when you comapare it to TFS - it's knocked 40% off our build time for a fairly hefty web app. It's not just the speed thats impressive though, having a complete history and full revision tracking capabilities, not dependent on network access or a central server is something as a TFS slave user, I've been longing for. I still think there's lots to get my head round, which will make things interesting next week when I have some real work to do on this project; so watch this space.
Here are some useful resources if you are just getting to grips with Git:
- Git Homepage
- GitHub - repository managment
- Git for the lazy - nice and concise
- Handy help docs from GitHub - including generating SSH keys so you can upload to GitHub
- A useful Git cheat sheet
Git Bandwagon
I've being feeling the peer pressure of late to try out Git as source code repository for our the app team's projects. Today I'm going to give it a try with one of our bigger web apps. I'm hoping that it won't take me too long to get my head round the way Git works and that it results in the project build time dropping on our CI server. Well it had better - time is money!
Git is an extremely fast, efficient, distributed version control system ideal for the collaborative development of software.