Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Dreamforce14 Metadata Management with Git Version Control

2,609 views

Published on

An introduction to using Git version control to manage changes in the metadata of your Salesforce Org as you develop your apps.

Your app is put into an unmanaged package, copied to your local machine with Force.com CLI and changes pushed to Github using Github for Mac/Windows client.

Published in: Technology
  • Be the first to comment

Dreamforce14 Metadata Management with Git Version Control

  1. 1. Managing changes in your Salesforce Org with Git agileforce.co.uk John Stevenson @jr0cket
  2. 2. Safe Harbor Safe harbor statement under the Private Securities Litigation Reform Act of 1995: This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services. The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, risks associated with possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal quarter ended July 31, 2011. This document and others are available on the SEC Filings section of the Investor Information section of our Web site. Any unreleased services or features referenced in this or other press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.
  3. 3. Why manager changes in your Salesforce Org? agileforce.co.uk John Stevenson @jr0cket
  4. 4. Keeping a record of change Understand: •what has been built •when something has been added or changed •who added that feature / bug
  5. 5. So, what is Git ? agileforce.co.uk John Stevenson @jr0cket
  6. 6. Say goodbye to Centralised version control No more merge days (weeks) No longer tied to the network No more waiting for the server to respond
  7. 7. So what is Git A distributed version control system Based on “change sets”, rather than files Easy to merge changes between branches & repositories Working Copy Staging Local Repository Github Repository
  8. 8. How do you use Git Github Repository
  9. 9. Getting Started with Git Git client - windows.github.com - mac.github.com - git-scm.com Identify yourself to Git git config --global user.name=“John Stevenson” git config --global user.email=“jstevenson@salesforce.com”
  10. 10. Github for Mac / Windows – Simple start point
  11. 11. So, what is Github ? agileforce.co.uk John Stevenson @jr0cket
  12. 12. “Social Coding” with Github Create repositories on Github and share your code with the world Features: Forking – create your own copy of a repository on Github Pull Requests – ask that your change be reviewed and added to someone else’s repository
  13. 13. Getting Started with Github Github account from github.com Optionally: - Add a Public key to your account - Add 2-factor authentication to your account
  14. 14. Lets use Git & Github to manage our Salesforce Org agileforce.co.uk John Stevenson @jr0cket
  15. 15. Create a repository on Github
  16. 16. Screenshots from blog post
  17. 17. 1. Add repository 1. Select “Clone” 1. Type name of repository to clone 1. Clone repository to your computer
  18. 18. Show me the Metadata agileforce.co.uk John Stevenson @jr0cket
  19. 19. Force.com IDE - Apex - Visualforce pages - Unit Tests - Git developer.salesforce.com/page/Force.com_IDE
  20. 20. MavensMate.com Sublime Text plugin for Force.com - Apex - Visualforce - Unit Tests - Git - Lightweight - Templates
  21. 21. Force.com Command Line Interface (CLI) force-cli.heroku.com
  22. 22. Packaging up the Gardening App agileforce.co.uk John Stevenson @jr0cket
  23. 23. The Gardening App I created a Salesforce App called Gardening
  24. 24. Create a new package I just want to version my Gardening App
  25. 25. Creating an unmanaged package
  26. 26. The Gardening App to the package
  27. 27. The Gardening App is now packaged
  28. 28. Using Force CLI to get your Metadata agileforce.co.uk John Stevenson @jr0cket
  29. 29. So what is Git force-cli.herokuapp.com
  30. 30. Connect Force CLI to your Salesforce Org Using OAuth secure connection force login
  31. 31. Connect Force CLI to your Salesforce Org From the directory created by the Github client force fetch package DreamforceHack --unpack
  32. 32. Versioning your Metadata agileforce.co.uk John Stevenson @jr0cket
  33. 33. Github Client picks up changes automatically
  34. 34. Github Client picks up changes automatically
  35. 35. Github Client picks up changes automatically
  36. 36. Github Client picks up changes automatically
  37. 37. Github Client picks up changes automatically
  38. 38. Where to go next… agileforce.co.uk John Stevenson @jr0cket
  39. 39. Resources 5pm Tuesday Using Force.com CLI to quickly build, control and automate Salesforce apps Git Cheetsheet developer.salesforce.com/page/Cheat_Sheets agileforce.co.uk
  40. 40. Thank you developer.salesforce.com agileforce.co.uk John Stevenson @jr0cket

×