GIT Usage

Basics course in using GIt version control of source code

GIT is nowadays the most popular version control systems for dealing with source code, because it is simplifies for teams to collaborate isolated in sub-systems of large software project, without disturbing development efforts in other parts of the project. Eventually, when it is time to incorporate the result GIT will perform most of the source editing work via a merge or rebase operation.

This is what you will learn
  • Understand how GIT operates
  • Master branching and merging
  • Import of exising source code into a remote GIT server, such as GitLab, GitHub and others
  • Working efficiently with a remote GIT repo
  • Being able to recover from various mistakes
  • Participate in collaborative software development and being able to create merge/pull requests
  • Know how to configure GIT and create macros
Course Contents

Background and Overview

asdfasdf

  • History
  • Properties
  • How GIT differs from most other VCS

Basic Operations

asdfasdf

  • Installation and configuration of a GIT client
  • Creating a local GIT project
  • Rudimentary configuration
  • Viewing help info
  • Staging files
  • Checking the project status
  • Commiting files

Working with Commits

asdfasdf

  • What is a commit
  • Understanding HEAD
  • Blobs and trees
  • Understand the commit ID, i.e. SHA-1 hash
  • The organization of the .git/ directory
  • Commit messages
  • How to pass multi-line commit messages on the command-line from other sources
  • Quick commits
  • Interactive add
  • Viewing the commit history
  • Tagging
  • Simple vs. annotated tags
  • How to view a file for a specific revision
  • How to find out what has changed in a file
  • How to find how much has changed in a commit
  • How to find out who made a change

Configuration

asdfasdf

  • Setting and reading configuration properties
  • Local and global properties
  • How to exclude generated files, such as *.class, *.o, *~
  • How to let GIT identify text files and separate out binary files
  • How to prevent GIT from removing empty directories
  • How to define your own GIT shortcuts
  • Creating your own GIT macros with GIT aliases

Branching

asdfasdf

  • What is a branch
  • Creating a branch
  • Switching to branches
  • Listing branches
  • Renaming branches
  • Deleting branches
  • What is "detached HEAD"

Merging

asdfasdf

  • What is a merge operation
  • Pre-merge scenarios
  • Fast-forwarding merge
  • True merge
  • Non-conflicting and conflicting merge operations
  • Initiating a merge
  • Aborting a merge
  • Resolving merge conflicts

GIT Flow

asdfasdf

  • Branch categories
  • Development branches
  • Understanding GIT Flow
  • GIT Flow shell extensions
  • GIT Flow steps and operations

Rebasing

asdfasdf

  • What is a rebase operation and how do it differs from a merge operation
  • Performing a rebase operation, step-by-step
  • Aligning branches
  • Interactive rebase
  • Editing commit messages
  • Squashing commits
  • Reorder commits
  • Skipping commits

Using GitLab

asdfasdf

  • Setting up a GitLab account
  • Creating a GitLab project
  • Rudimentary configuration

Starting a Remote GIT Project

asdfasdf

  • What is a remote GIT repository
  • SSH vs. HTTPS
  • Generating SSH keys and register them with a server such as GitLab
  • Cloning an existing repo
  • Create a new repo and clone it
  • Attach a local repo to a newly created remote repo
  • Creating a bare repo and clone it locally

Working with Remote Repos

asdfasdf

  • Adding and removing associations to remote repos
  • Understanding tracking of remote branches
  • Uploading commits (push)
  • Downloading commits (fetch)
  • Understanding what happens during a fetch operation
  • Merging a remote branch with a local branch
  • Using pull

Collaboration between Remote Repos

asdfasdf

  • What is a fork operation
  • What is a merge request, aka pull request
  • Contributing code to a non-authorized repo
  • Submitting a merge/pull request

Recovering from Mistakes

adfasdf

  • Undo code changes
  • Undo add
  • Undo last commit
  • Undo push
  • Undo merge
  • Undo rebase
  • Undo merge commit
  • Reset a project to specified commit point
  • Fixing a commit to the wrong branch
  • Preventing GIT from removing empty dirs
  • Creating a source archive file, without its GIT history

Stashing

asdfasdf

  • What is GIT stashing
  • Pushing to the stash stack
  • Inspecting the stash stack
  • Popping from the stash stack

GIT Hooks

adsfasdf

  • What is a GIT hook
  • Hookable GIT events
  • How to print a message before commit
  • Preventing unwanted commit messages

Searching the Commit History

asdfasdf

  • Understanding the log command
  • What is GIT bisect
  • Bisect initialization
  • Bisect bug hunting
  • Finishing an active bisect operation
  • Scripting bisect bug hunting

GIT Tools

asdfasd

  • Graphical GIT clients
  • Running you own GIT server
  • Using the GitHub Desktop
  • Show diffs and perform merge operations with Meld and Diffuse
  • Incremental merge with git-imerge
  • Running your own server in seconds with GitBlit
  • Running your own full-scale server with GitLab
Facts
NameGIT Usage
Duration2 Days
LevelBeginner
AudienceSoftware developersd
PrerequisitesProgramming experience
Tools
  • GIT
  • Text editor
Price 15 000 kr + moms 15000
Course Dates
DatePlace
Loading course dates...
Same-Company Discout

We offer a 20% discount for additional participants from the same company and at the same course date. Read more here.

On-Site Course

If you order an On-Site course, we will come to you and hold the course in your office. The price is determined by our price model and is based on the number of course days, number of participants and any travel and lodging.

Read more about out price modell and term of sales here.

Related Courses
CourseDaysLevel
BASH Shell Scripts Programming1BeginnerShow
Jenkins CI/CD Server1BeginnerShow