Coder Social home page Coder Social logo

ubiquitous-pancake's Introduction

ubiquitous-pancake

this is a demo repository

Branch Protection Rules

  • main
    • "Require status checks to pass before merging"
    • "Require branches to be up to date before merging"

Didn't really do anything other than protect master from force-pushes.

Which is somewhat nice on its own, but it didn't prevent pushing to master.

ubiquitous-pancake-dev

this is a demo repository

We will

  1. checkout a new branch called dev on this repository.
  2. make dev the base branch, on this repository.
  3. delete the master-branch on this repository.
  • Add branch protection with 6 reviewers to discourage merging to dev.
  • But we will "allow force pushes," because that might come in handy in a second allows us to update the dev branch with the master from the other repository.

Setup

Clone the ubiquitous-pancake-dev (origin) repository, as this is where we do the development.

git clone [email protected]:figaw/ubiquitous-pancake-dev.git

Add the ubiquitous-pancake (prod) repository, as a remote where,

  • developers have read-only access.
  • "integration managers" have read-write access.
git remote add prod [email protected]:figaw/ubiquitous-pancake.git

Workflow - Fake-Fork, Integration-Manager

See: https://git-scm.com/book/en/v2/Distributed-Git-Distributed-Workflows

The developer will...

  1. Checkout the "truth": git checkout main (there is only main on prod)
  2. Update the "truth": git pull
  3. Start doing work: git checkout -b feature/NG-123/newthing
  4. Do work: touch file, git add ., git commit -m "ADD stuff"
  5. Deliver draft: git push -u origin HEAD
    • Branch is pushed to dev (origin) repository
  6. A PR is created on the dev repository, at some point it's ready to be merged and an intergration manager takes over.

The Integration Manager will...

  1. Checkout the branch of the PR: git checkout feature/NG-123/newthing.
  2. Deliver change git push prod HEAD. (HEAD means "current branch/commit")
  3. Create a PR on the prod repository. (Maybe reference the PR on -dev..)
  4. Merge to master on the production repository.
  5. Close the PR on -dev
  6. Switch to the local truth: git checkout master
  7. Update the local truth: git pull
  8. Update the remote dev with truth: git push origin master:dev

NB: at this point we could update the -dev repository with the changes in prod but it's not really that interesting because all the developers are checking out the prod repository when they start making changes.

NB: I'm slightly uncertain as to the problems of not keeping the dev branch up to date. [Update] the problems are, PR's on -dev will contain all the "missing" commits. Steps have been updated above.

ubiquitous-pancake's People

Contributors

figaw avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.