Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add workflow diagram to working_with_remotes.md assignment. #29446

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions git/intermediate_git/working_with_remotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,20 @@ This section contains a general overview of topics that you will learn in this l
- Dangers of history-changing operations.
- Best practices of history-changing operations.

### Workflow Diagram
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heading needs to be sentence case

Suggested change
### Workflow Diagram
### Workflow diagram


Here is a visual representation of the workflow with Git and GitHub and illustrates how changes flow between repositories during collaboration.

```mermaid
graph TD;
A[Upstream Repository: TheOdinProject/curriculum] -->|git fetch upstream/main| B[Local Repository: main];
B -->|git checkout your_branch_name| C[Local Repository: your_branch_name];
C -->|git push origin your_branch_name| D[Your Fork on GitHub];
D -->|Create Pull Request to Upstream| E[Pull Request on GitHub];
E -->|Maintainers Merge PR to Upstream| A[Upstream Repository: TheOdinProject/curriculum];

```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This diagram doesn't render on the site properly. You can check that anything you're introducing renders properly by using our markdown preview tool.

To see the correct syntax for mermaid diagrams, look at the mermaid section of our LAYOUT_STYLE_GUIDE. This should get it to display properly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoshDevHub Thanks for pointing that out! I've reviewed the Mermaid section of the LAYOUT_STYLE_GUIDE and used the Markdown preview tool. I've wrapped the Mermaid diagram code in

 tags in working_with_remotes.md and pushed the updated version. The diagram now renders correctly in the preview tool. Could you please take another look?


#### git push -\-force

Let's say you're no longer working on a project all by yourself, but with someone else. You want to push a branch you've made changes on to a remote repository. Normally, Git will only let you push your changes if you've already updated your local branch with the latest commits from this remote.
Expand Down