GIT Version Control

Solarion

Honorary Master
Joined
Nov 14, 2012
Messages
28,050
Reaction score
17,804
http://git-scm.com/

The head developer here wants to start using this for the team. Can someone please explain version control in a nutshell for me, I need a crash course.

Thanks! :)
 
You put code in, it keeps it safe, maintains an audit on code changes and who changed it and when it was changed. It allows you to create branches, release branches, and alternative development streams. This allows you to merge them in at a later point (with some pain at times). It also allows more than a single developer to work on a file and check it in at the same time, one may need to merge in another developers commits.
 
In basic terms it is a storage and mechanism for code. One developer will push his code to server and you can pull that code down on your machine. If there are conflicts (you and him both made changes to the same file) the tools will either merge it automagically for you or you'll be prompted to fix it.

You're CI/build server will also be able to periodically pull these changes and kick off a new build and deploy it for you.

It is WAY more complex and involved than that (but easy to work with once you get it), but in a nutshell it allows multiple people to work on the same codebase.

What are you currently using? TFS, SVN, nothing?
 
If you're running a development team, it's unthinkable that you aren't already running some type of source control.

Essentially, it's like dropbox on steroids. You have a central repository that stores all your code, when a developer makes changes they are sent to the repository which tracks all the changes made. This gives you an overview of the code base, you can see all the changes made and by who, you can look at any given file and check the history/changes on it and in the case of a bug being introduced, you can revert changes.

It also prevents devs from overwriting each others changes, as before changes can be pushed to the repository, the source control system will check that there aren't any conflicts.

There are a few different systems, tfs, svn, mercurial, git is (arguably) the best of the lot.
 
op maybe elaborate on how you currently manage your code.
what do you do to collaborate and how do you guys deploy or roll out?

I think this is what everybody is waiting for. My current bet is file share.
 
I think this is what everybody is waiting for. My current bet is file share.

Cool thanks for the info. We aren't using in form of version control atm so yes, file sharing it is. The few of us just make sure we're not working on the same files :o
 
I think this is what everybody is waiting for. My current bet is file share.

I've seen this. I set up a file server for a small web development company. I went though all the effort of setting up SVN for them with Redmine integration, explained in detail how everything works. They still just work directly off a smb share /sigh.
 
I've seen this. I set up a file server for a small web development company. I went though all the effort of setting up SVN for them with Redmine integration, explained in detail how everything works. They still just work directly off a smb share /sigh.

We did this at the first company I worked for...and then we installed SVN.
 
Cool thanks for the info. We aren't using in form of version control atm so yes, file sharing it is. The few of us just make sure we're not working on the same files :o

Start here: http://git-scm.com/book/en/v2/Getting-Started-About-Version-Control

And then practice using it on a few files. If you are on a windows machine installing Git and a proper GUI tool like SourceTree (very user friendly but slow) will get you going. Personally I prefer Git-Extensions.

EDIT: Unless you are the owner....then just listen to your dev
 
Cool thanks for the info. We aren't using in form of version control atm so yes, file sharing it is. The few of us just make sure we're not working on the same files :o

do-not-want-surprised-guy20110725-22047-v78czz.jpg

Yeah, listen to your head developer, and give him a raise while you're at it.

Disclaimer: There will be pain and suffering initially, but once everyone is used to it you'll never look back
 
ok.
we all agree file shares are terrible.
it has no auditing, no history, you can't revert, i bet you have files called file_backup or file.old or whatever all over the place. yuck.

so you need source control. do you have a dedicated sort of "dev server" or something? if so cool, if not then get one. you can run your source control server on a dev machine but its not recommended.

what do you do? windows form apps? websites? how do you deploy stuff? how big are you guys, how many devs? what tech stack do you have?

if you're relatively small i would also look at something like SVN (subversion).
its seen as simpler than git.

but if you guys do a lot of branching (where you take the source code, copy it somewhere else, and edit it to try and do something new or test something out while your teamies are still working on maintaining stuff) then look at GIT.

i would also look at getting some sort of automated build going.
teamcity is a free build server if you're a small team, and it is awesome.
 
if you're relatively small i would also look at something like SVN (subversion).
its seen as simpler than git.

Simpler in what way? Simpler to understand up front, not so simple if the project gets big.

I've switched to (large) teams over from TFS/SVN style source control systems to Git and Mercurial respectively and it just makes everything else so much easier. IMHO they should just go with Git and get it over with.
 
GitLab is a great way to get started with Git. You can install it to a local server if you don't want to commit all your code to the cloud.

Check it out here: https://about.gitlab.com/installation/

There is also an awesome OpenVZ template, if you run OpenVZ VM's anywhere in your company: http://www.turnkeylinux.org/gitlab

If they are a small team on Windows then I recommend Atlassian Stash. Only downside is that it gets very expensive if you have more than 10 users.
 
@ hamster

im with you but svn is perceived as simpler, so i thought i would mention it and said that i would also look at it. i would go git now, but i'm glad i started with a less complex and centralized solution.

if they're looking at source control they should at least know there are options.
 
If they are a small team on Windows then I recommend Atlassian Stash. Only downside is that it gets very expensive if you have more than 10 users.

We are quite a small team, about 5 devs in total.
 
Top
Sign up to the MyBroadband newsletter
X