0%

Book Description

Controlling different versions of files is an efficient process with Git, and this book makes it a snap to learn too! A practical tutorial, it hard-wires the lessons through hands-on exercises throughout the course.

  • A complete beginner's workflow for version control of common documents and content
  • Examples used are from non-techie, day to day computing activities we all engage in
  • Learn through multiple modes – readers learn theory to understand the concept and reinforce it by practical tutorials.

In Detail

Git – is free software which enables you to maintain different versions of single or multiple directory contents, and allows you to switch back and forth between them at any given point of time. It also allows multiple people to work on the same file collaboratively or in parallel, without being connected to a server or any other centralized system continuously.

This book is a step by step, practical guide, helping you learn the routine of version controlling all your content, every day.

If you are an average computer user who wants to be able to maintain multiple versions of files and folders, or to go back and forth in time with respect to the files content – look no further. The workflow explained in this book will benefit anyone, no matter what kind of text or documentation they work on.

This book will also benefit developers, administrators, analysts, architects and anyone else who wishes to perform simultaneous, collaborative work, or work in parallel on the same set of files. Git's advanced features are there to make your life easier.

Table of Contents

  1. Git: Version Control for Everyone Beginner's Guide
    1. Table of Contents
    2. Git: Version Control for Everyone Beginner's Guide
    3. Credits
    4. About the Author
    5. Acknowledgement
    6. About the Reviewers
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Time for action – heading
        1. What just happened?
        2. Have a go hero – heading
      6. Reader feedback
      7. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Breathe Easy – Introduction to Version Control System
      1. Do you need help
      2. What is a version control system
      3. Why you need a version control system
      4. Types of version control systems
        1. Local version control system
          1. Tidbits
        2. Centralized version control system
        3. Distributed version control system
      5. Falling for Git
        1. Atomicity
        2. Performance
        3. Security
      6. Summary
    10. 2. Welcome Aboard – Installing Git
      1. Choosing your type – download your OS specific package
        1. Windows
        2. Linux
        3. Mac
        4. Installation
      2. Time for action – installing Git on Windows
        1. What just happened?
      3. Time for action – installing Git on Mac
        1. What just happened?
      4. Time for action – installing Git on Linux
        1. What just happened?
      5. Summary
    11. 3. Polishing Your Routine – How to Increase Everyday Productivity
      1. Suit up – getting ready for your Git
      2. Initiation
      3. Time for action – initiation in GUI mode
        1. What just happened?
      4. Time for action – initiation in CLI mode
        1. What just happened?
        2. Behind the screen
        3. Configure Git
      5. Time for action – configure Git in GUI mode
        1. What just happened?
          1. Out of flow
      6. Time for action – configure Git in CLI mode
        1. What just happened?
      7. Adding your files to your directory
      8. Time for action – adding files to your directory (GUI and CLI mode)
        1. What just happened?
        2. Ignore 'em
        3. Bulk operations
          1. .gitignore to the rescue
      9. Time for action – usage of .gitignore
        1. What just happened?
        2. Undo addition
      10. Committing the added files
      11. Time for action – committing files in GUI mode
      12. Time for action – committing files in CLI mode
        1. What just happened?
      13. Time for action – rescan in GUI mode
      14. Checking out
      15. Time for action – checking out using GUI mode
        1. What just happened?
      16. Time for action – checking out using CLI mode
      17. Resetting
      18. Time for action – reset using GUI mode
      19. Time for action – reset using CLI mode
        1. What just happened?
        2. Git help
        3. Have a go hero – try out the help module
      20. Summary
    12. 4. Split the Load – Distributed Working with Git
      1. Why share your files
        1. Scenario 1: single player
        2. Scenario 2: multiple players – one at a time
          1. Kid's play – push and pull for a remote source
            1. Cloning ain't banned here
        3. Scenario 1: solution
          1. Going public – sharing over the Internet
            1. A bit of Bitbucket
      2. Time for action – adding a remote origin using CLI mode
        1. What just happened?
      3. Time for action – resume your work from anywhere using CLI mode
        1. What just happened?
      4. Time for action – adding a remote origin using GUI mode
        1. What just happened?
      5. Time for action – resume your work from anywhere using GUI mode
        1. What just happened?
        2. Scenario 2: solution
          1. Inviting users to your Bitbucket repository
        3. What just happened?
          1. Staying local – share over the intranet
            1. Concept of a bare repository
      6. Time for action – creating a bare repository in CLI mode
      7. Time for action – creating a bare repository in GUI mode
        1. What just happened?
      8. Summary
    13. 5. Be a Puppet Master – Learn Fancy Features to Control Git's Functions
      1. Why learn such fancy features
        1. Prerequisites
        2. Shortlog
      2. Time for action – getting acquainted with shortlog
        1. What just happened?
      3. Time for action – parameterizing shortlog
        1. What just happened?
        2. Log search – git log
      4. Time for action – skip commit logs
        1. What just happened?
      5. Time for action – filter logs with date range
        1. What just happened?
      6. Time for action – searching for a word/character match
        1. What just happened?
        2. Clean
      7. Time for action – emulate the mess
        1. What just happened?
      8. Time for action – clean up your mess with pattern match
        1. What just happened?
      9. Time for action – wipe out your mess completely, no exceptions
        1. What just happened?
        2. Tagging
      10. Time for action – lightweight/unannotated tagging
        1. What just happened?
      11. Time for action – referencing tags
        1. What just happened?
      12. Time for action – annotated tagging
        1. What just happened?
          1. Simple exercise
        2. What just happened?
      13. Summary
    14. 6. Unleash the Beast – Git on Text-based Files
      1. Git for text-based files – an introduction
      2. Multiplayer mode – multiple players at a time
        1. Multiple players – one at a time
        2. Multiple players – all hands on deck (many at a time)
          1. Sharing your repository
      3. Time for action – getting ready to share
        1. What just happened?
      4. Time for action – distributed work force
        1. What just happened?
      5. Time for action – Bob's changes
        1. What just happened?
      6. Time for action – Lisa's changes
        1. What just happened?
      7. Time for action – Lisa examines the merge conflict
        1. What just happened?
      8. Time for action – Lisa resolves the merge conflict
        1. What just happened?
          1. GUI mode – get the repository's history graph
          2. CLI mode – get the repository's history graph
      9. Time for action – team members get sync with the central bare repo
        1. What just happened?
      10. Summary
    15. 7. Parallel Dimensions – Branching with Git
      1. What is branching
      2. Why do you need a branch
        1. Naming conventions
      3. When do you need a branch
      4. Practice makes perfect: branching with Git
        1. Scenario
      5. Time for action – creating branches in GUI mode
        1. What just happened?
      6. Time for action – creating branches in CLI mode
        1. What just happened?
      7. .config file – play with shortcuts
      8. Time for action – adding simple aliases using CLI
        1. What just happened?
      9. Time for action – chain commands with a single alias using CLI
        1. What just happened?
      10. Time for action – adding complex aliases using GUI
        1. What just happened?
      11. Summary
    16. 8. Behind the Scenes – Basis of Git Basics
      1. Two sides of Git: plumbing and porcelain
      2. Git init
        1. Hooks
        2. Info
        3. Config
        4. Description
        5. Objects
          1. Blob
          2. Trees
          3. Commits
          4. Tags
        6. HEAD
        7. Refs
          1. Bumper alert – directories inside heads and tags
        8. Index
      3. Git – a content tracking system
      4. Git add
      5. Git commit
      6. Git status
      7. Git clone
      8. Git remote
      9. Git branch
      10. Git tag
      11. Git fetch
      12. Git merge
      13. Git pull
      14. Git push
      15. Git checkout
      16. Relation across relations – Git packfiles
        1. Transferring packfiles
      17. Summary
    17. Index
52.15.112.69