Giter Site home page Giter Site logo

forking-workflow-exercise's Introduction

Exercise: practice collaborative forking workflow

In this exercise, we make a fork, push to that fork, and make a pull request to the "central" repository. Later we will exercise updating the individual forks after changes from all participants have been merged.

As an example we will collaboratively develop a cookbook for taco recipes, inspired by tacofancy.

We recommend that you discuss with your neighbor throughout the exercise.

Objectives:

  • Learn how to fork, modify the fork, and file a pull request towards the forked repo.
  • Learn how to update your fork with upstream changes.

Part A: Fork and clone

First fork this repository into your namespace and then clone the fork to your computer.

Part B: Open an "issue" as a change proposal

Before we start any coding, open a new "Issue" on the central repository as a "proposal" where you describe your idea for a recipe with the possibility to collect feedback from others. After creating this issue note the issue number. We will later refer to this issue number.

Discuss with your neighbor why it can be useful to open an issue before starting the actual coding.

Part C: Modify and commit

Before we do any modification, we create a new branch and switch to it: this is a good reflex and a good practice. Choose a branch name which is descriptive of its content.

On the new branch create a new file which will hold your recipe, for instance traditional_coderefinery_tacos.md (but change the name). You can get inspired here. Hopefully we all use different file names, otherwise we will experience conflicts later (which is also interesting!).

There is also a file called test.py which will automatically verify whether your recipe contains the string "taco" (case insensitive). This is there to slowly introduce us to automated testing.

Once you are happy with your recipe, commit the change and in your commit message reference the issue which you have opened earlier with "this is my commit message; closes #N" (use a more descriptive message and replace N by the actual issue number).

Part D: Push your changes to the fork

Now push your new branch to your fork. Your branch is probably called something else than "feature". Also verify where "origin" points to.

$ git push origin feature

Part E: File a pull request

Then file a pull request from the branch on your fork towards the master branch on the repository where you forked from.

Wait here until we integrate all pull requests into the central repo together on the big screen.

Observe how the issues automatically close after the pull requests are merged (provided the commit messages contain the right keywords).

Part F: Update your fork

We do this part after the contributions from all participants have been integrated.

Once this is done, practice to update your forked repo with the upstream changes and verify that you got the files created by other participants.

Make sure that the contributions from other participants are not only on your local repository but really also end up in your fork.

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.