- Notifications
You must be signed in to change notification settings - Fork42
Update docs#336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Update docs#336
Changes fromall commits
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
4 changes: 2 additions & 2 deletionsREADME.md
This file contains hidden or 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
206 changes: 0 additions & 206 deletionsdocs/docs/build-tutorial.md
This file contains hidden or 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 |
|---|---|---|
| @@ -10,209 +10,3 @@ A tutorial is made up of two parts: | ||
| 2. Git Commits | ||
| We'll go into each in detail in more detail. | ||
122 changes: 122 additions & 0 deletionsdocs/docs/edit-tutorial.md
This file contains hidden or 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,122 @@ | ||
| --- | ||
| id:edit-tutorial | ||
| title:Editing a Tutorial | ||
| sidebar_label:Editing a Tutorial | ||
| --- | ||
| Once you've created a tutorial, you'll need a way to version and update new releases. | ||
| Tutorials are made of two parts: Markdown & Git commits. | ||
| ###1. Editing Markdown | ||
| When editing markdown, simply edit the markdown and re-run the builder. | ||
| ###2. Editing Git Commits | ||
| Editing Git commits is a bit harder, and involves a part of Git called an "interactive rebase". | ||
| 1. Create a new branch and give it a versioned named, like "v0.2". It's important to create a new branch as we will be changing the git commit history. | ||
| ```shell | ||
| git checkout -b v0.2 | ||
| ``` | ||
| 2. Start an interactive rebase. | ||
| When editing code, you'll need to rebase. You can use VSCode as your default editor for Git:<https://blog.soltysiak.it/en/2017/01/set-visual-studio-code-as-default-git-editor-and-diff-tool/.> | ||
| Run rebase starting at a commit target, or just from the start with`--root`. | ||
| ```shell | ||
| git rebase -i --root | ||
| ``` | ||
| ###Editing A Commit | ||
| Choose the commit you want to edit | ||
| ```text | ||
| pick b73feaf commit 2.1 setup | ||
| pick 0a3aa83 commit 2.1 solution | ||
| pick 0d67935 commit 3.1 setup | ||
| ``` | ||
| Let's say we want to edit step 2.1 Change the word pick to "edit" or "e". | ||
| ```text | ||
| e b73feaf commit 2.1 setup | ||
| ``` | ||
| Save the modified rebase summary file and your rebase will start. Git will run through the commits until the first flagged "edit", then stop at the commit. | ||
| Make the file changes you planned, then "add" your changes to git. | ||
| To complete rebasing: | ||
| ```shell | ||
| git rebase --continue | ||
| ``` | ||
| If you encounter any merge conflicts along the way, resolve them, add the changes and continue as above. | ||
| ###Adding Additional Commits | ||
| Let's say we wanted to add an additional commit after the 2.1 solution. | ||
| ```text | ||
| pick b73feaf commit 2.1 setup | ||
| pick 0a3aa83 commit 2.1 solution | ||
| pick 0d67935 commit 3.1 setup | ||
| ``` | ||
| To cause the rebase to pause after a commit, use the word "break" or "b". | ||
| ```text | ||
| pick b73feaf commit 2.1 setup | ||
| pick 0a3aa83 commit 2.1 solution | ||
| break | ||
| pick 0d67935 commit 3.1 setup | ||
| ``` | ||
| Save the rebase summary file to start the process. The process should stop at the "break". | ||
| Add the commits you want, and when you finish continue: | ||
| ```shell | ||
| git rebase --continue | ||
| ``` | ||
| If you encounter any merge conflicts along the way, resolve them, add the changes and continue as documented in the "editing a commit" section. | ||
| ###Rewording a Commit | ||
| Let's say we wanted to change the title of commit "3.1" to "2.2". | ||
| ```text | ||
| pick b73feaf commit 2.1 setup | ||
| pick 0a3aa83 commit 2.1 solution | ||
| pick 0d67935 commit 3.1 setup | ||
| ``` | ||
| You can use the "reword" or "r" method. | ||
| ```text | ||
| pick b73feaf commit 2.1 setup | ||
| pick 0a3aa83 commit 2.1 solution | ||
| reword 0d67935 commit 3.1 setup | ||
| ``` | ||
| When you're finished, just save the file and the commits will be updated. | ||
| ###Oops! Something Went Wrong | ||
| Rebasing is a difficult skill to master, but you can get good at it with time. That said, time travelling is a complicated process and a lot can go wrong. | ||
| If something goes wrong during your rebase, you can abort by running: | ||
| ```shell | ||
| git rebase --abort | ||
| ``` | ||
| It's best to only run rebase on new branches so that you'll always be able to get back to your last working version. |
20 changes: 20 additions & 0 deletionsdocs/docs/git-timeline.md
This file contains hidden or 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,20 @@ | ||
| --- | ||
| id:git-timeline | ||
| title:Git Timeline | ||
| sidebar_label:Git Timeline | ||
| --- | ||
| A CodeRoad tutorial runs on Git commits: | ||
| 1. init | ||
| - Basic project setup code | ||
| - test runner dependencies | ||
| - .vscode workspace configurations | ||
| 2. setup | ||
| - add unit tests | ||
| - add unit testing dependencies | ||
| - add scaffolding code (if needed) | ||
| 3. solution | ||
| - the code required to make the tests pass | ||
| Then repeat steps 2 & 3. |
18 changes: 18 additions & 0 deletionsdocs/docs/init-commit.md
This file contains hidden or 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,18 @@ | ||
| --- | ||
| id:init-commit | ||
| title:Initial Commit | ||
| sidebar_label:Init Commit | ||
| --- | ||
| Include basic setup for your project. | ||
| The first commit requires some necessary setup. See an example:[init · ShMcK/coderoad-fcc-basic-node-and-express@c722f9e · GitHub](https://github.com/ShMcK/coderoad-fcc-basic-node-and-express/commit/c722f9e9ec8f94d7fba04cfa3375e0896346ced0). A JS project should include: | ||
| - .gitignore - ignore`package-lock.json` or it will cause merge conflicts | ||
| - .vscode/extensions - would recommend “dbaeumer.vscode-eslint” | ||
| - .vscode/launch.json - file for running the debugger | ||
| - .vscode/settings.json - ensure that`formatOnSave` and linting are enabled | ||
| - README.md | ||
| - package.json - include test commands - include repo - include test runner dependencies | ||
| If starting a project with React, bear in mind that create-react-app runs some pretty hacky processes behind the scenes. You can use the following boilerplate in your project:[init with coderoad react tutorial starter · ShMcK/coderoad-tutorial-tweeter@059e004 · GitHub](https://github.com/ShMcK/coderoad-tutorial-tweeter/commit/059e0041691f39e3bf078022512d01a93214b6bb) |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.