Skip to content

Commit 608d275

Browse files
clarify branch+pull and fork+pull
1 parent 54f20c6 commit 608d275

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

content/same-repository.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,4 +342,23 @@ To protect a branch in your own repository, go to "Settings" -> "Branches".
342342
- Pull request is a mechanism to suggest and review changes.
343343
- An issue is a place where we note and discuss problems or ideas.
344344
- Both get a number and they can reference each other but that's all they have in common.
345+
- [Linking a pull request to an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue)
346+
347+
**What is the practical difference between branch + pull and fork + pull?**
348+
- The practical difference between branch + pull and fork + pull lies in how collaboration is structured in a Git-based workflow.
349+
- Branch + Pull (Single Repository Contribution) : Used when contributing to a repository where you have direct write access.
350+
- Process:
351+
1. Clone the main repository.
352+
2. Create a new branch in the same repository.
353+
3. Make changes and commit them.
354+
4. Push the branch to the same repository.
355+
5. Open a Pull Request from your branch to the main branch.
356+
- Fork + Pull (External Contribution): Used when contributing to a repository where you do not have write access.
357+
- Process:
358+
1. Fork the repository (create your own copy under your GitHub account).
359+
2. Clone your forked repository locally.
360+
3. Create a new branch in your fork.
361+
4. Make changes and commit them.
362+
5. Push the branch to your fork.
363+
6. Open a Pull Request from your fork to the original repository.
345364
:::

0 commit comments

Comments
 (0)