-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tim mckiernan
committed
Jun 22, 2022
1 parent
384cd85
commit ae0ddfd
Showing
22 changed files
with
28,454 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# Collaboration with GitHub | ||
|
||
## Learning objectives | ||
|
||
By the end of this lesson you should be able to: | ||
|
||
- Create branches locally on their own machine. | ||
- Merge branches locally and push those changes to GitHub. | ||
- Push branches to GitHub and merge those branches via pull request. | ||
- Pull changes from GitHub to their local machine. | ||
- Share access to a GitHub repository to other developers. | ||
|
||
--- | ||
|
||
## Guiding questions | ||
|
||
- Create a new directory from the command line and `cd` into it. What is the command to create a new `git` repository? | ||
|
||
- After creating a `git` repository, how many commits does the repository have? | ||
|
||
- Create a new file called `favorite-movies.txt`. Then add your changes, commit, and then look at your git history. | ||
|
||
What command will show you all of the commits you've made? | ||
|
||
- Create a new branch called `add-movies`. How can you create a new branch? | ||
|
||
- In your own words, what is the purpose of creating a branch? | ||
|
||
- How do you switch to a newly created branch? Do so, so that you are on the `add-movies` branch. | ||
|
||
- How can you tell what branch you are on? | ||
|
||
- Open the `favorite-movies.txt` file and add two or three of your favorite movies on separate lines. Then, add and commit your changes. | ||
|
||
What is the current difference between the `add-movies` branch and the `main` branch? | ||
|
||
- Go back to your `main` branch. What happened to the contents in your `favorite-movies.txt` file? | ||
|
||
- How can you merge the changes from the `add-movies` branch into the `main` branch? | ||
|
||
Once you've determined how, do so. | ||
|
||
- Create a new GitHub repository and connect your local and remote repository. | ||
|
||
Currently, what branches are available to you on your local machine? What branches are available on GitHub? | ||
|
||
- On your local machine, switch over to the `add-movies` branch. Add one or two more movies and then make a commit. | ||
|
||
How can you push your `add-movies` branch up to GitHub? Once you know how, do so. | ||
|
||
- Go to your GitHub repository's page and create a pull request from the branch you just pushed up. Once a pull request is created, merge it. | ||
|
||
Now, what is the difference between your local `main` branch and your remote `main` branch? | ||
|
||
- Use `git pull` to sync your local and remote `main` branches. | ||
|
||
On what branch should you run the `git pull` command? | ||
|
||
- Is there any difference on your local machine between the `main` and `add-movies` branch at this point? Why or why not? | ||
|
||
- In your own words, summarize the journey of the last commit you just made. Use technical terms and make sure to distinguish between activities happening locally vs remotely. | ||
|
||
## Group activity | ||
|
||
You will be split into groups of two or three. Choose one person to be the "project manager" for the group. Then, do the following. | ||
|
||
- The project manager should share access to the repository they just created. | ||
- Other members of the group should clone down the repository. (Remember, you should not put a repository inside of another one, so make sure to `cd` up a directory or two.) | ||
- Have one member of the group (it doesn't matter who) create a new branch with their name. They should add, commit, and push their changes. Then, make a pull request. | ||
- The project manager should merge the pull request. | ||
- Then, each member of the team should pull down the changes to their `main` branch. | ||
|
||
Continue this process until every member of the team has had a chance to add a few favorite movies. Remember you will always need to `pull` before making your own branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# Getting Started with Create React App | ||
|
||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). | ||
|
||
## Available Scripts | ||
|
||
In the project directory, you can run: | ||
|
||
### `npm start` | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. | ||
|
||
The page will reload when you make changes.\ | ||
You may also see any lint errors in the console. | ||
|
||
### `npm test` | ||
|
||
Launches the test runner in the interactive watch mode.\ | ||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.\ | ||
It correctly bundles React in production mode and optimizes the build for the best performance. | ||
|
||
The build is minified and the filenames include the hashes.\ | ||
Your app is ready to be deployed! | ||
|
||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. | ||
|
||
### `npm run eject` | ||
|
||
**Note: this is a one-way operation. Once you `eject`, you can't go back!** | ||
|
||
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. | ||
|
||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. | ||
|
||
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. | ||
|
||
## Learn More | ||
|
||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). | ||
|
||
To learn React, check out the [React documentation](https://reactjs.org/). | ||
|
||
### Code Splitting | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) | ||
|
||
### Analyzing the Bundle Size | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) | ||
|
||
### Making a Progressive Web App | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) | ||
|
||
### Advanced Configuration | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) | ||
|
||
### Deployment | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) | ||
|
||
### `npm run build` fails to minify | ||
|
||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) |
Oops, something went wrong.