mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-11 05:13:02 -05:00
docs(rebase): write a rebase doc
This commit is contained in:
@@ -25,7 +25,7 @@ To streamline the process, I have created an Nx generator that will set up all t
|
||||
- <b>challengeDifficulty</b>: The difficulty you think your challenge has. There are three difficulty levels : 🟢 easy / 🟠 medium / 🔴 hard
|
||||
- <b>name</b>: name of the Nx application.
|
||||
:::note
|
||||
It must be written in **Kebab-Case**
|
||||
It must be written in **kebab-case**
|
||||
:::
|
||||
- <b>docRepository</b>: The category of your Challenge: Nx, Angular, Angular Performance, Rxjs, NgRx, Typescript.
|
||||
|
||||
@@ -48,3 +48,7 @@ Don't forget to update the docs to introduce your challenge and provide your ins
|
||||
:::
|
||||
|
||||
It's your turn to act!!! 💪
|
||||
|
||||
## Solution Submittion
|
||||
|
||||
After one week or so, don't forget to provide your solution to your challenge.
|
||||
|
||||
55
docs/src/content/docs/guides/rebase.md
Normal file
55
docs/src/content/docs/guides/rebase.md
Normal file
@@ -0,0 +1,55 @@
|
||||
---
|
||||
title: Rebase your branch
|
||||
description: Guide to rebase a branch to latest change
|
||||
sidebar:
|
||||
order: 6
|
||||
---
|
||||
|
||||
Sometimes, changes may be added to the project. I'll attempt to make changes that won't break anything, but sometimes it's inevitable.
|
||||
|
||||
Most of the time, you won't need to rebase your solution, but here is a guide to help you know how to do it.
|
||||
|
||||
:::note
|
||||
This guide is applicable to any Open Source Project.
|
||||
:::
|
||||
|
||||
## Steps to rebase your branch
|
||||
|
||||
### Sync your repository
|
||||
|
||||
First, you need to synchronize your fork to ensure it's up to date with the forked repository.
|
||||
|
||||
You can achieve this by clicking the Sync fork button on the main page of your fork.
|
||||
|
||||

|
||||
|
||||
The image above shows that my branch is behind of the main branch by 8 commits, and I need to synchronize it to be up to date.
|
||||
|
||||

|
||||
|
||||
### Open a terminal
|
||||
|
||||
Open any terminal of your choice, either the one from your favorite IDE or a standalone instance.
|
||||
|
||||
### Git
|
||||
|
||||
Follow the following commands to rebase your local branch:
|
||||
|
||||
- git checkout main
|
||||
- git pull
|
||||
- git checkout [your branch]
|
||||
- git rebase main
|
||||
- Resolve Conflicts
|
||||
|
||||
At this step, the rebase may stop because your local branch has conflicting files with the main branch. Correct them. After this is done:
|
||||
|
||||
- git add .
|
||||
- git rebase --continue
|
||||
|
||||
If your branch doesn't have any conflicts, a success message will be shown.
|
||||
|
||||
### Push your work back to the remote branch
|
||||
|
||||
Finally, push your work back to GitHub:
|
||||
|
||||
- git push -f
|
||||
Reference in New Issue
Block a user