Git Essentials
The Clearvision Git Essentials training course provides a comprehensive understanding of basic Git concepts and looks at the different ways Git can be used and implemented.
Audience:
Prerequisites:
- Access to laptop
- Internet connection
Course outline:
Module 1: Introduction
- What this course covers
- The need for Version Control
- A brief history of git and what it is (i.e. a DVCS)
- What is DVCS
- Plumbing and Porcelain
- The repository (at high level)
- Getting Started
Lab Exercises
1. Group discussion, understanding DVCS
Module 2: Git Concepts
- Git Object Types
- Blobs
- Trees
- Commits
- Tags
- Git Reference Types
- Object Model Example
- Hash Values (SHA-1)
- The Git Data Model
Lab Exercises
- 1. Verify Git Installations
- 2. Identify the git repository
- 3. Ask Git for help
Module 3: Getting Started
- How to create a new Git repository
- Setting up Your Git Environment
- Basic workflow
- Adding new files
- Changing existing files
- Committing changes to the repository
- The Git Log
Lab Exercises
- 1. Identify yourself to Git
- 2. Create a Git repository
- 3. How to add new files/folders
- 4. How to commit new files/folders
- 5. Clone an existing repository
- 6. Check the status of your Git repository
Module 4: Working with Git
- Workflow
- The Status command
- Ignoring file types
- View specific changes
- Removing files & directories
- Moving files & directories
- Stashing Changes
- Undoing or fixing errors
- Reset a change
- Revert a change
- Checkout a change
Lab Exercises
- 1. Use the git log command to help you clarify if you are committing the correct version of a file
- 2. Use the git status command to help you clarify the current state of your repository
Module 5: Branching and Merging
- What is a branch
- Creating a branch
- Switching between branches
- What is a merge
- Fast forward merge
- 3-way merge
- Resolving merge conflicts
- Merge tools
- Removing branches
- Rebasing
- Branch management in Git
Lab Exercises
- 1. Create branches in Git
- 2. Add files to branches
- 3. Checkout branches
- 4. Merge into branches
- 5. Rebase and squash a feature branch
Module 6: Collaboration Basics
- Cloning repositories
- Remotes
- Remote Branches and Tracking Branches
- Fetching, Pulling and Pushing Changes
- Bare and development repositories
- Publishing repositories
Lab Exercises
- 1. Clone a repository
- 2. Create or Identify a remote
- 3. Pull changes
- 4. Push changes
- 5. Merging between repositories
Module 7: Collaboration Stratagies
- Branching Strategies
- Structural Strategies
Lab Exercises
- 1. A flexible exercise implementing the strategy you intend to use moving forward
Module 8: Tagging
- What is a tag
- Viewing tags
- Creating tags
- Signed tags
- Tagging later
- Sharing tags
Lab Exercises
- 1. Create tags in Git
- Lightweight tags
- Annotated tags
- Checkout tags in Git
- 2. How to view tags
- 3. How to checkout tags