You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/same-repository.md
+33Lines changed: 33 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,3 +329,36 @@ To protect a branch in your own repository, go to "Settings" -> "Branches".
329
329
- But we successfully contributed to a **collaborative project**!
330
330
- The pull request allowed us to contribute without changing directly:
331
331
this is very good when it's not mainly our project.
332
+
333
+
:::{discussion} Let's clarify typical questions
334
+
**What is the difference between `git pull` and a pull request?**
335
+
-`git pull` is a command that fetches changes from a remote repository and
336
+
merges them into the current branch.
337
+
- Pull request: change proposal. It might have been named this way because
338
+
after you accept a pull request, internally it git pulls the changes from
339
+
the branch containing the change proposal.
340
+
341
+
**What is the difference between a pull request and an issue?**
342
+
- Pull request is a mechanism to suggest and review changes.
343
+
- An issue is a place where we note and discuss problems or ideas.
344
+
- 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.
0 commit comments