githubschool / githubschool/popcorn-color

Parking Lot

Open
#9 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

## Post any questions you may have here during the training.

Don't forget you have the training manual [here](https://githubtraining.github.io/training-manual/#/01_getting_ready_for_class).

### Day 1
[Day 1 Meeting recording](https://github.zoom.us/rec/share/6_ZzP4PW1lhOQInK6B_lcaQbILTqeaa8hHNK-qdYmEnwjZHbxEs5NT-4WVz-1Vs8)
Access Password: 1w=.m958

- [x] Intro
- [x] What is Git & GitHub?
- [x] Local operations
- [x] GitHub flow
- [x] Pull requests
- [x] Merge conflicts

### Day 2
[Day 2 Meeting recording](https://github.zoom.us/rec/share/puApPZPV72BOHq-Q8Xrtd_J6RtrCT6a8gHAa-_UEzki1JEQJPKo34A_SaAfD0htm)
Access Password: 3O.0Q&4&

- [x] Forking
- [x] Bisect
- [x] Revert
- [x] `git add -p`
- [x] Tags & Releases
- [x] Git Internals
- [x] Dangerous commands
* Amend
* Reset
* Reflog
* Cherry pick
* Merge strategies
- Additional Topics: CODEOWNERS, `.gitignore`

## Notes to help you review

**Project 1**
- git: Centralized vs. Distributed version control system
- Git vs. GitHub
- What is a repository?
- What is README.md?
- What is Markdown?
- Issues vs. Pull Requests
- Wiki vs. GitHub Pages (can be demo-ed using Project 1)
- How to unsubscribe from repository / Pull Request / Issues
- git configs
- What is the difference between `--global`, `--system` and `--local`?
- GitHub Flow
- Why do we need Pull Requests?
- Why do we need branch protection?
- `git branch` vs. `git branch --all`
- Pull Request keywords to close issues: `closes`, `resolves` and `fixes`
- What is a draft Pull Request?
- Why do we need to open PR as soon as possible? How do I inform repo managers that my pull request is still a work in progress so that they don't merge my PR?
- Pruning: What is pruning and why do we need to do it? We didn't get a chance to cover this in class but pruning helps you delete remote-tracking branches that were deleted on GitHub. You do this with `git pull --prune`.
- `git config --global fetch.prune true` to prune by default so each time you run `git pull` it will prune automatically for you.

**Project 2**
- What is a merge conflict? How does it happen?
- What's the difference between the `commit merge` button and `merge pull request` button when resolving a merge conflict? Why are we merging twice?
- Resolving a merge conflict locally, we will be using reverse merge:
```
git checkout feature-branch
git merge master
```
- When resolving a merge conflict, you can just commit without adding if you're not making additional changes. When you `git commit` after resolving a conflict, your text editor will pop up to prompt you to edit the commit message. You can use `git commit --no-edit` so that your editor doesn't pop up to prompt you for a change in commit message.
- `git merge --abort` to exit out of a merge

**Project 3**
- What is Forking? Forking vs. Branching
- `git bisect`
- `git revert`
- Why is revert safe?
- Why do we need atomic commits for revert to work?
- Staging hunks with `git add -p`
- What is the purpose of staging hunks?
- Tags vs. Releases

**Project 4**
- `git init`
- `git commit --amend`
- `git reset`
- what's the difference between `git reset` and `git revert`? Is there a preferred command?
- `git reflog`
- `git cherry-pick`
- Cherry-pick in release based workflows
- fast-forward merge vs. no fast-forward/ recursive/ merge commit
- Merge commit vs. Rebase vs. Squash

## Best Practices
1. Open PR early
- Use Draft Pull Request
- Or use “WIP label” / WIP Probot
2. Practice GitHub Flow (unless has advanced workflow that makes sense)
3. Avoid using `git add .`, add files one by one
4. Commit messages should be ~50 characters
5. Make atomic commits (you are able to describe your work in a single commit message - don’t commit after 3 months of work)
6. Use `git pull --prune` to clean up references of remote-tracking branches. Or set the default: `git config --global fetch.prune true`, this setting lets you prune by default.
7. We don’t encourage the use of forks in a company. Forks are only useful when consuming and contributing to open source projects
8. Small atomic commits help with `git revert`

## Basic Git Commands

![Screen Shot 2020-06-25 at 9 03 51 AM](https://user-images.githubusercontent.com/38323656/85734815-e9c2f480-b6c2-11ea-8a6e-5063eedfe4e9.png)

## Day to Day Basic Workflow
![Screen Shot 2020-05-07 at 10 39 02 AM](https://user-images.githubusercontent.com/38323656/85734834-efb8d580-b6c2-11ea-90df-f3f2284680d7.png)

_Assuming you have already cloned this repository, and it already exists on your local machine_
1. Update your local main branch:
```
git checkout master
git pull
```
2. Update your local feature branch
```
git checkout feature-branch
git merge master
```
2a. Do your work and commit
```
git add
git commit -m
```
3. `git push`
4. Open Pull Request, get your reviews and merge your PR into main branch
5. Rinse and repeat. `git checkout master`, `git pull`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.