- What is Git?
- How we use Git
- Hands-on training
- Upstream
- Origin
- Local
Create Local Repo:
$ git clone
https://github.com/<YOU>/git-lesson.git
$ git remote add upstream
https://github.com/OpenWhere/git-lesson.git
git fetch upstream
git checkout upstream/master
git branch my-feature
git checkout my-feature
Branches
- Lightweight Pointers
- Collections of Commits
Commits
- Code Changes
- Atomic
Pull Requests
- One (or more!) Commits
- Whole feature/bugfix
- Great for Code Reviews
Code Reviews
- Improve code quality
- Hone skills
- BEFORE merge (important for CI)
So far:
- Forking
- Cloning
- Branching
Now:
- Committing
- Pushing/Submitting
- Pull Requests
- Merge Conflicts
Edit:
index.html
resources/generator.js
git status
git diff
git add -p
git diff --cached
git commit
git push origin my-feature
- github.com/OpenWhere/git-lesson
- Follow on-screen prompts to create Pull Request
- Review Code again
- Write Descriptive Title
- Add helpful description (screenshots!)
- Read the code in Github
- Check out the code and test locally
git remote add derek [email protected]:owdd/git-lesson.git
git fetch derek
git checkout derek/<derek's branch name>`
git fetch upstream
git branch
(verify correct branch)git merge upstream/master
- Resolve conflicts
git commit -a
git push origin my-feature