Skip to content

Commit

Permalink
Merge pull request #82 from redhat-ai-services/upstream-rebase
Browse files Browse the repository at this point in the history
add rebase documentation
  • Loading branch information
strangiato authored Dec 10, 2024
2 parents 752ebbc + 2c3ad58 commit 75ff939
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .wordlist-txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ RBAC
README
RHACM
RHOAI
Rebasing
RoleBinding
Rollout
Route
Expand Down Expand Up @@ -293,6 +294,7 @@ provisioner
psql
pvc
rbac
rebase
redhat
redistributions
repo
Expand Down
50 changes: 50 additions & 0 deletions documentation/rebase_from_upstream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Rebasing from Upstream

When forking and using the repo it can often be valuable to rebase your copy from upstream to get some of the latest changes.

## Pulling upstream

From your local fork of the ai-accelerator repo

Be sure you have the upstream repo set as a remote named `upstream`

```
git remote add upstream git@github.com:redhat-ai-services/ai-accelerator.git
```

If you don't already have an upstream branch, checkout a local copy of the upstream/main branch as a branch called upstream:

```
git checkout -b upstream upstream/main
```

If you already have an upstream branch, pull the latest version of the branch

```
git checkout upstream
git pull upstream main
```

Use `git log` to validate that he latest commits from the upstream branch have been pulled successfully.

## Rebasing

Next you will need to rebase your `upstream` branch from your local main.

To begin, make sure your local main branch is up to date with your fork.

```
git checkout main
git pull origin main
```

You can now start the rebase from main

```
git checkout upstream
git rebase main
```

You may have merge conflicts that need to be resolved depending on what changes you have made to your fork. Work through the standard merge conflict process.

Once you are done, it is recommended to push your upstream repo to GitHub and create a PR from your updated upstream branch into main. Be sure to validate any changes that the upstream rebase introduced.

0 comments on commit 75ff939

Please sign in to comment.