Skip to content

Commit 3f8bcfc

Browse files
committed
Adding practice for p3
1 parent 7ff106a commit 3f8bcfc

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

docs/basics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ Practice the above skills by doing the following:
257257

258258
1. In a local git repository that has a GitHub remote, add a new file with some content in it.
259259
2. `git add` that file to the repository.
260-
3. Edit the file some more.
260+
3. Edit the file some more, and add a second file with more content.
261261
4. Use `git status` to view the state of your repo.
262262
5. `git add .` your new changes again.
263-
6. `git commit` the added file and `git push` it to GitHub.
263+
6. `git commit` the added/changed files and `git push` it to GitHub.
264264
7. Using the GitHub web interface, add another file to your repository.
265265
8. Use `git pull` to pull down changes in the repository.
266-
9. Use `git log` to view all commit activity in the repo.
266+
9. Use `git log` to view all commit activity in the repo.

docs/forks-branches.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,4 +251,20 @@ git checkout dev
251251
git checkout main -- settings.yaml
252252
git add settings.yaml
253253
git commit -m "Fetched in the settings file"
254-
```
254+
```
255+
256+
## Practice
257+
258+
Practice the above skills by doing the following:
259+
260+
1. Working in a GitHub repository you have cloned to your local machine, create a new branch in the repo.
261+
2. Switch to that branch.
262+
3. Make some changes/additions to the branch and `add`/`commit` those changes.
263+
4. Push the new branch to GitHub and verify that you can see it in the GitHub web interface.
264+
5. Switch back to the `main` branch of your repo, locally. Delete the extra branch you created.
265+
6. Delete the extra branch within the GitHub web UI.
266+
7. BONUS: Fork another project that you do not own. This could be a repo for a Python package, platform, or tool that you work with.
267+
8. Clone your fork to your local workstation.
268+
9. Explore the code to understand some of its structure.
269+
10. Create a new branch within your fork.
270+
11. Make some changes/additions, then `git add` and `git commit` those changes. Push your branch back to your fork in GitHub.

0 commit comments

Comments
 (0)