SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2005
    Location
    Perth, Australia
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What is the benefits of using Git?

    Hey guys,

    Recently downloaded a tutorial from Lynda.com (Bootstrap 3) which the developer talks a little bit about Git.

    From researching the internet I have found that it is a source code management (reference http://en.wikipedia.org/wiki/Git_(software))

    But I'm confused as to why you would submit your code to Git unless you wanted other developers to work on the same project with you.

    Can you please clarify if this is something that should be used when building new websites or is it something to release publicly that others can use once you have finished...

  2. #2
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,380
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can use Git on your own computer without uploading it to Git.com. I wrote a tutorial on doing this. Git is free to download and try.

    Git allows you to create "branches" to test code with. When they are working properly, you merge the branch into the working site. You can have as many branches as you wish.

    Git allows you to save all the versions of your site, day by day. You can revert to an earlier version quickly. You can read a summary of the last several versions to see what you (or a collaborator) did lately. You'll add special "commit" messages to summarize what those files contain. Git has many ways of navigating those versions.

    Git allows you to compare changed files among versions.

    These are only a very few things you can do with Git. Some design firms will not hire anyone who has no version-control software (like Git) experience.
    Steve Husting

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2005
    Location
    Perth, Australia
    Posts
    146
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Steven,

    Thank you for your explanation.

    Makes more sense now.

    I will download some tuturials and start trying to get my head around it.

    Cheers

  4. #4
    Community Advisor ULTiMATE's Avatar
    Join Date
    Aug 2003
    Location
    Bristol, United Kingdom
    Posts
    2,160
    Mentioned
    46 Post(s)
    Tagged
    0 Thread(s)
    Let's say you're building a website, and you want to add two new features to your site. A forum and a chat room. You're working on both, and then a critical bug comes through that you need to fix. What do you do with the forum and chat room code you were working on?

    If you're using Git, you'd have a branching model, and any new tasks would be in their own branches. Also, the live branch would be separate from your main development branches. You'd have separate branches for the live site to fix critical bugs (with their own branches, of course), a forum branch and a chat branch.

    This, for me, is the biggest benefit of source control. Keeping your source code safe is obvious, but this has been around for years with SVN and numerous other source control tools. Only since distributed version control tools have become mainstream has branching been considered a first-class citizen, and absolutely necessary to building a website.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •