Skip to content

Commit

Permalink
docs: ✏️ Change orgremote to upstream and clarify instructions
Browse files Browse the repository at this point in the history
Instead of using orgremote for the organization git, use upstream.
Explain what to do if you have writing rights and don't need to fork.
Explain why we have two remotes.

✅ Closes: #165
  • Loading branch information
abelsiqueira committed May 30, 2024
1 parent a93a148 commit d9acd68
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
19 changes: 13 additions & 6 deletions docs/src/90-developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,31 @@ pre-commit run -a

## First time clone

> [!NOTE]
>
> If you have writing rights, you don't have to fork. Instead, simply clone and skip ahead. Whenever **upstream** is mentioned, use **origin** instead.
If this is the first time you work with this repository, follow the instructions below to clone the repository.

1. Fork this repo
2. Clone your repo (this will create a `git remote` called `origin`)
3. Add this repo as a remote:

```bash
git remote add orgremote https://github.com/abelsiqueira/COPIERTemplate.jl
git remote add upstream https://github.com/abelsiqueira/COPIERTemplate.jl
```

This will ensure that you have two remotes in your git: `origin` and `upstream`.
You will create branches and push to `origin`, and you will fetch and update your local `main` branch from `upstream`.

## Working on a new issue

1. Fetch from the JSO remote and fast-forward your local main
1. Fetch from the remote and fast-forward your local main

```bash
git fetch orgremote
git fetch upstream
git switch main
git merge --ff-only orgremote/main
git merge --ff-only upstream/main
```

2. Branch from `main` to address the issue (see below for naming)
Expand Down Expand Up @@ -88,8 +95,8 @@ If this is the first time you work with this repository, follow the instructions
- Fetch any `main` updates from upstream and rebase your branch, if necessary:

```bash
git fetch orgremote
git rebase orgremote/main BRANCH_NAME
git fetch upstream
git rebase upstream/main BRANCH_NAME
```

- Then you can open a pull request and work with the reviewer to address any issues.
Expand Down
19 changes: 13 additions & 6 deletions template/docs/src/90-developer.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,31 @@ pre-commit run -a

## First time clone

> [!NOTE]
>
> If you have writing rights, you don't have to fork. Instead, simply clone and skip ahead. Whenever **upstream** is mentioned, use **origin** instead.

If this is the first time you work with this repository, follow the instructions below to clone the repository.

1. Fork this repo
2. Clone your repo (this will create a `git remote` called `origin`)
3. Add this repo as a remote:

```bash
git remote add orgremote https://github.com/{{ PackageOwner }}/{{ PackageName }}.jl
git remote add upstream https://github.com/{{ PackageOwner }}/{{ PackageName }}.jl
```

This will ensure that you have two remotes in your git: `origin` and `upstream`.
You will create branches and push to `origin`, and you will fetch and update your local `main` branch from `upstream`.

## Working on a new issue

1. Fetch from the JSO remote and fast-forward your local main
1. Fetch from the remote and fast-forward your local main

```bash
git fetch orgremote
git fetch upstream
git switch main
git merge --ff-only orgremote/main
git merge --ff-only upstream/main
```

2. Branch from `main` to address the issue (see below for naming)
Expand Down Expand Up @@ -88,8 +95,8 @@ If this is the first time you work with this repository, follow the instructions
- Fetch any `main` updates from upstream and rebase your branch, if necessary:

```bash
git fetch orgremote
git rebase orgremote/main BRANCH_NAME
git fetch upstream
git rebase upstream/main BRANCH_NAME
```

- Then you can open a pull request and work with the reviewer to address any issues.
Expand Down

0 comments on commit d9acd68

Please sign in to comment.