Git Forked Repository Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 30: Line 30:
</syntaxhighlight>
</syntaxhighlight>


=Send a PR=
=PR Cycle=
==Send a PR==




Line 41: Line 42:
The UI will give you the default choice to send the PR against the base repository while "Create pull request". Use it.
The UI will give you the default choice to send the PR against the base repository while "Create pull request". Use it.


=Merge the PR=
==Merge the PR==


Upon approval ...
Upon approval ...
Line 47: Line 48:
<font color=darkkhaki>How to deal with the leftover branch?</font>
<font color=darkkhaki>How to deal with the leftover branch?</font>


=Sync the Repository after the PR Merge=
==Sync the Repository after the PR Merge==




<font color=darkkhaki>TODO: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork</font>
<font color=darkkhaki>TODO: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork</font>

Revision as of 20:06, 1 November 2023

Internal

Overview

Terminology

The forked repository is known as "head" repository.

The repository that was forked is known as the "base" repository.

Fork

Go to GitHub UI and click on the "Fork" button at the top of the page.

Where should we work <project-name>? 

Use your own "personal" organization.

Forking <original-org>/<project-name>

Clone

Clone as usual:

git clone git@github.example.com:ovidiu-feodorov/blue.git

PR Cycle

Send a PR

Push the commit in the head repository.

It will show up in the UI.

Click "Compare & pull request"

The UI will give you the default choice to send the PR against the base repository while "Create pull request". Use it.

Merge the PR

Upon approval ...

How to deal with the leftover branch?

Sync the Repository after the PR Merge

TODO: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork