Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Forking Repository

A fork is a copy of a repository that you want to make changes to. Instead of using a single Git repository as the "central" codebase, forking a repository gives every developer their Git Repositories. Each contributor has two Git repositories: private local, and public.

The advantage of the forked repository is that contributions can be integrated without needing everybody to push to a single central repository. Developers push to their git repositories, and only the administrator of the original repository can merge the forked repositories. The administrator accepts developers' commits without giving them written access to the official repository.

First Option:

  1. Create a fork of Chef’s repository into the Ministry’s Github.Git branching and pull request workflow

  2. Clone forked repo.

  3. Create a feature|bug fix branch.

    • git checkout -b  feature/<ticket id>-<ticket-title-short>

  4. Push local changes to remote feature|bug branch.

    • git add

    • git commit -m "your commit message here"

    • git push

  5. When ready, create PR to merge changes from the feature|bug branch to the master of the forked repo.

  6. Create PR from the Forked branch to the main Chef Repository master branch.

Second Option:

  1. Create a fork of Chef’s repository into the individual developer’s Github.

  2. Create a feature|bug fix branch.

    • git checkout -b  feature/<ticket id>-<ticket-title-short>

  3. Before pushing local changes, update local changes with the remote features branch.

    • git pull origin features

  4. Push or publish local changes to feature|bug fix branch.

    • git add .

    • git commit -m "your commit message here"

    • git push

  5. When ready, create PR to merge changes from the feature|bug branch to the CHEFS Repository features branch.

  6. Before creating PR from the feature branch, update it with the master branch.

    • git fetch origin features

    • git switch features

    • git pull origin

  7. Create PR from the feature branch to the main Chef Repository master branch.

Third Option

  1. Create a fork of Chef’s repository into the individual developer’s Github.

  2. Create a feature|bug fix branch.

    • git checkout -b  feature/<ticket id>-<ticket-title-short>

  3. Before pushing/publishing the feature|bug branch to remote, update it with the master branch.

    • git pull origin

  4. Push or publish local changes to feature|bug fix branch.

    • git add .

    • git commit -m "your commit message here"

    • git push

  5. Create PR from the feature branch to the main Chef Repository master branch.

  • No labels