Contents
- Introduction
- Prerequisites
- Fork
- Commit
- Merge
- Pull Request
- Lab 4: CLI Integrate Feature
- Lab 5: CLI Merge Conflicts
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
Add files 1
git checkout -b featureA
Modify files IntelliJ edits Check status 1
git add newFile.js
Commit changes 1
git status
Push changes to your public fork 1
git commit -a -m ‘fixes bug’
Compare changes 1
git push -u origin featureA
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
Determine what’s changed git diff master…contrib1
git pull https://github.com/onetimeguy/project
Generate Pull Request on GitHub site (b/w branches or branch & fork) Notify Review & Team updates Getting changes
1
2
3
4
5
class="highlight">1
2
3
4
5
6
7
8