Contents

Introduction

Git is the foundation of GitHub. Before using GitHub or the IntelliJ Git interface, it is important to understand some basic git concepts and commands.

This section provides some practice exercises to enhance your understanding of the Git CLI.

Prerequisites

  • Access to GitHub repository (note about how to get that)

TODO: MM All of this needs work

Fork

Lab 2 Implement a feature

Create Fork (on GitHub site, click upper right button) Create feature branch

1
git checkout -b featureA
Add files
1
git add newFile.js
Modify files IntelliJ edits Check status
1
git status
Commit changes
1
git commit -a -m ‘fixes bug’
Push changes to your public fork
1
git push -u origin featureA
Compare changes
1
git compare master..featureA

Commit

Merge

Pull Request

Lab 3: CLI Share with Team (one time)

Generate Pull Request on Github site (b/w branches or branch & fork) Notify Review & Team updates Getting changes

1
git pull https://github.com/onetimeguy/project
Determine what’s changed git diff master…contrib

Generate Pull Request on GitHub site (b/w branches or branch & fork) Notify Review & Team updates Getting changes

class="highlight">
1
2
3
4
5
class="highlight">
1
2
3
4
5
6
7
8