Skip to content

Updating your fork

Brady Stroud [SSW] edited this page Jul 3, 2023 · 7 revisions

Why do I need to Update my fork?

Your fork is a copy of the original repository and it doesn't automatically receive updates when changes are made.
To get the latest changes from SSWConsulting/SSW.Rules.Content into your fork, you will need to sync them manually.
Below are some ways of updating your fork with the original repository.

Method 1: Update your fork using Git

  1. Clone the fork to your local machine with git by running the below command, replacing YOUR-USERNAME with your GitHub account name.
git clone https://github.com/YOUR-USERNAME/SSW.Rules.Content
  1. Add the main branch of SSWConsulting/SSW.Rules.Content as a remote
cd SSW.Rules.Content  
git remote add --track main upstream git://github.com/SSWConsulting/SSW.Rules.Content.git
  1. Pull the latest changes from SSWConsulting/SSW.Rules.Content and merge them into your fork
git fetch upstream  
git checkout main  
git merge upstream/main
  1. Push your updated fork to GitHub
git pull  
git push
  1. Done! Your fork is now up to date

Method 2: Update your fork using GitHub

  1. Navigate to your fork of SSW.Rules.Content

  2. Click "New pull request"

This screen may look familiar as this is how we normally make a Pull Request from our fork back to the base Repository.
We want to reverse this so that any changes that have been made on SSWConsulting/SSW.Rules.Content are synced with our fork.
To do this we will create a Pull Request back into our fork.

  1. Change the base repository to your fork

Change base repository

  1. Compare the changes across forks
    You'll receive a message saying "There isn't anything to compare". This is because our source and destination are the same.
    Click "compare across forks"

Compare across forks

  1. Change the head repository to SSWConsulting/SSW.Rules.Content (Where we are pulling from)

Change head repo

  1. Click "Create pull request"

Change head repo

  1. Add a name for the pull request and click "Create pull request"

Change head repo

  1. Click "Merge Pull Request"

Change head repo

  1. Click "Confirm merge"

Change head repo

  1. Done 🙂

Method 3: Deleting and re-creating fork ⚠️

WARNING - This method will delete any changes that are on your fork, and not merged in yet

  1. follow the GitHub docs to delete your fork https://docs.github.com/en/repositories/creating-and-managing-repositories/deleting-a-repository
  2. Create it again

Who will accept my Pull Request?

When a pull request is made, the email is been sent to the Author (aka Acknowledgement) to approve.

  1. There is a Power Automate flow which triggers when a Pull Request is created.
  2. All the Acknowledgements of the rule will receive an email with subject: "Attention: Pending GitHub pull request approval"
  3. You can directly check with the Author(s) of the rule about the pull request as there will an email already sent to approve the same.
Clone this wiki locally