• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
You're doing it wrong! Git it right!
 

You're doing it wrong! Git it right!

on

  • 3,056 views

Source code management and version control are absolutely essential to a successful software and web development project, especially when working with a team of developers. If your development ...

Source code management and version control are absolutely essential to a successful software and web development project, especially when working with a team of developers. If your development workflow does not include Git, you're doing it wrong! Git it right! Git was first developed in 2005 by Linus Torvalds (yes, THE Linus Torvalds) as a distributed system for managing the development of the Linux kernel. Today, Git is used by companies and organizations large and small. According to the official Git webiste (http://git-scm.com/), Git is used Google, Micorosoft, Facebook, Twitter, and LinkedIn, just to name a few. Even the Joomla CMS and Joomla Platform teams now use Git.

In this presentation, Cory Webb discusses Git and how his company uses Git to manage their web development workflow. He will go over some basic Git commands that every developer should know, as well as cover some popular tools for using Git locally and for hosting Git repositories. He will also open a discussion about how to overcome the limitations of Git, primarily when it comes to managing changes in the database between development and production servers.

Statistics

Views

Total Views
3,056
Views on SlideShare
3,054
Embed Views
2

Actions

Likes
3
Downloads
17
Comments
0

2 Embeds 2

https://plus.google.com 1
https://duckduckgo.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    You're doing it wrong! Git it right! You're doing it wrong! Git it right! Presentation Transcript

    • manoscrafted.com/git-it-right.pdf
    • Who am I?● Working with Joomla/Mambo since 2003● Founded Manos (formerly Cory Webb Media, LLC) in 2008● Author of Beginning Joomla Website Development (Wrox 2009)
    • Who are you?● Developers/Programmers● Designers● Integrators
    • Agenda● Why version control?● Intro to Git● Git Basics● Git Clients● Git Repository Hosting● Using Git for Joomla Projects● Questions
    • Why version control?● Less of this: “Im going to be working on template.css today, so nobody touch it!”● More of this: “Lets all work on template.css today and use our version control system to merge our changes at the end of the day!”
    • Why version control?● Easier to work as a team● Snapshots of your code at various stages of development● Branching, staging and experimentation● Ability to revert back to previous versions
    • Intro to Git● Off cial website: http://git-scm.com i● Distributed version control system● Enables team collaboration● Free and open source (GPLv2 license)● Used by Joomla, Google, Facebook, Microsoft, Twitter, LinkedIn, Netf ix, etc.... l● Seamlessly branch and merge code changes● Work locally
    • Intro to Git● Multiple backups● Custom workflows● Data assurance● Code staging
    • Git Basics | Commands● git clone● git init● git status● git add .● git commit -m “Comment about commit”● git push● git pull● git merge
    • Git Basics | git clone● Clone an existing Git repository● Creates an exact copy of the repository● Changes can be shared between the original and the clone● http://git-scm.com/docs/git-clone
    • Git Basics | git init● Initialize a new git repository● Create a new project from scratch● http://git-scm.com/docs/git-init
    • Git Basics | git status● Returns the current status of the repository● Displays list of new, modified, and deleted files● Displays list of changes staged for commit● http://git-scm.com/docs/git-status
    • Git Basics | git add● Add changes to the staging area● Stage modifications (new files and changed files) to be committed to the repository● http://git-scm.com/docs/git-add
    • Git Basics | git commit● Commits staged changes to the repository● Add a comment using -m “Comment”● Stage changes using -a after git commit● http://git-scm.com/docs/git-commit
    • Git Basics | git push● Updates remote repositories with local repository● http://git-scm.com/docs/git-push
    • Git Basics | git pull● Fetches a remote repository or local branch and merges changes with the local repository into the current branch● http://git-scm.com/docs/git-pull
    • Git Basics | git merge● Merges 2 or more development histories together● http://git-scm.com/docs/git-merge
    • Git Basics | .gitignore● File that specifies files within your project that Git should ignore● Using the git status command will not list files from the .gitignore file● Files listed will never be staged for commit or committed● http://git-scm.com/docs/gitignore
    • Git Clients | Mac● GitHub for Mac - Free - mac.github.com● Tower - $59 - www.git-tower.com● Gitbox - $9.99 / Free - www.gitboxapp.com● GitX - Free - gitx.laullon.com● SourceTree - Free - www.sourcetreeapp.com● Git-Cola - Free - http://git-cola.github.com/● SmartGit - $79 / Free - www.syntevo.com/smartgit
    • Git Clients | Windows● GitHub for Windows - Free - windows.github.com● Git Extensions - Free - code.google.com/p/gitextensions● Git-Cola - Free - http://git-cola.github.com/● SmartGit - $79 / Free - www.syntevo.com/smartgit● TortoiseGit - Free - http://code.google.com/p/tortoisegit/
    • Git Clients | Linux● Git-Cola - Free - http://git-cola.github.com/● SmartGit - $79 / Free - www.syntevo.com/smartgit
    • Git Repository Hosting● GitHub.com● BitBucket.org● BeanstalkApp.com● Assembla.com● CodebaseHQ.com● BareGit.com● Gitorious.org – RoR Git repo hosting app
    • Using Git for Joomla Projects● Getting started● Establish your workflow● Deployment● Database issues
    • Git for Joomla | Getting Started● Initialize the root directory of your Joomla project with git init in your local web server (MAMP)● Install Joomla● Set up your .gitignore file to specify files you dont want to track● Add your files to the repository with git add .● Commit your new files to the repository with git commit -m “Initial commit”
    • Git for Joomla | Getting Started● Set up remote hosting for your repository● Push your local repository to the remote hosting● Each developer clones the repository to their local systems● TIP: Ignore the configuration.php file and let that be specific to each developers local repo.
    • Git for Joomla | Establish workflow● Subversion-style Workflow Image from git-scm.com
    • Git for Joomla | Establish workflow● Integration Manager Workflow Image from git-scm.com
    • Git for Joomla | Establish workflow● Dictator and Lieutenants Workflow Image from git-scm.com
    • Git for Joomla | Deployment● BeanstalkApp.com enables easy deployment to development, staging, and production servers● Overwrite existing code files with the master repository once it is deemed ready for deployment
    • Git for Joomla | Database Issues● Git does not track changes to a MySQL database● Probably using different databases for each developer, the development server, staging server and the production server● Development usually involves changing the database (adding articles, menu items, modules, etc. in Joomla)● How do we deal with changes across so many different databases?
    • Git for Joomla | Database Issues● Option 1: Point all instances of Joomla to the same remote database.● Option 2: Manually track changes.● Option 3: Use a database synchronization tool such as red-gate.com/products/mysql/mysql-comparison-tools/● Solution may vary depending on the details of your project
    • Questions?@corywebb @jlleblanc