Giter Site home page Giter Site logo

parsons-python-summer-2020 / git-book-activity Goto Github PK

View Code? Open in Web Editor NEW
9.0 5.0 38.0 7.39 MB

Teaching repo for demonstrating git and Github for Python Summer of Code Students. For use with the Git Workshop for Parsons School of Design. Written and developed by Jason Li

git-book-activity's Introduction

A Million Monkeys Writing Shakespeare with Git

This repository is for teaching how to work with git.

In this repository, there are 300 pages to a book that hasn't been written. Follow along with the instructions to get into the workflow. It is highly recommended that you go over the terms in Atlassian's Git overview here: https://www.atlassian.com/git/tutorials/source-code-management (10 min read). There is also a separate pull request tutorial written here: https://medium.com/@jasonzhenli/pull-requests-merging-remotes-a5244cf96039 (6 min read).

For Git, you need to know the following key terms:

  • Repository, or repo: the container for all the code that will be controlled and monitored by Git
  • Branch: a different version of the repository that contains a series of changes that are grouped as a single set. A repository can have multiple branches. There is usually a Master Branch and a Development Branch
  • Local: the version of the repository that exists on your machine. When used to describe branches, they are branches that are present and available on the machine.
  • Remote: the online version of the repository, this is its own set of branches entirely. Remote is not worked on directly.
  • Clone: creating a local copy of the remote repository
  • Commit: Telling git to save the changes that you have made to the file in the Git history. This is different than saving the file. Committing the changes allows git to track them.
  • Merge: Combining a one branch's set of changes into another branch. e.g. You merge the Development branch into Master.
  • Push: Sending the changes from the local repository to the remote repository.
  • Pull: Updating the current local branch with changes from the remote version of the same branch.
  • Conflict: Occurs when a branch's changes are incompatible with another branch's

With all of that in mind, you are ready to try this git activity and your own page to the book!

The pdf in this repo also has visual aids for these instructions

Instructions

  1. Clone this repo wih your preferred git client of choice
  2. Switch to the 'development-writing' branch
  3. Create a local branch off of the 'development-writing' with the name format 'Page-###-Writing' where ### is replaced with the page number. 001, 011, or 200
  4. Open the page with that number you selected
  5. Add your own amazing writing to that page
  6. Save that document
  7. Return to github and Commit your changes.
  8. Merge your writing branch to the development branch.
  9. Push the changes and make a pull request.
  10. Wait for someone to approve that pull request
  11. Congratulations! You have now successfully added some changes to the page.

What has happened:

By submitting your pull request, you have asked to contribute to a branch's history. This lets the owner of the project review the changes and approve them before combining them into the rest of the project. Here is here conflicts can be managed and fixed if need be.

Even once the pull request is made, all changes are not immediately made available. By choosing which branch to merge your changes into, git can keep a master branch clean from pull requests and allow the development branch to take most of the changes. This keeps the history of the master branch tidy, as it will only ever contain merges from the development branch.

Once the development branch is merged into the master, then the rest of the changes that we collectively worked on in the development branch will be available to see in the master branch.

Feel free to continue to play with any of the pages or make new branches off of the development branch as you need to. The pull requests will be managed for the duration of the class.

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.