Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add rebase documentation #82

Merged
merged 2 commits into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading