Code Monkey home page Code Monkey logo

git-tuto's Introduction

Git Tutorial

GitHub Workflow Build Status

This repository will help you practice the basics of the GitHub flow and how to work on open source projects.

Here is a link to a presentation to git in general: https://docs.google.com/presentation/d/1vfsG__2-T7xJYGKFs9HfPKmaoMN1Je0V0h7gLyiY1AU/edit?usp=sharing

Steps

These steps assume that you have installed git locally, that you have created a GitHub account, and have added your local ssh key to it.

  1. Fork this repo, using the fork button in the top right corner.

  2. Clone your forked repo locally. git clone [email protected]:<your-github-handle>/git-tuto.git

  3. Add the original project as a distant repo. git remote add upstream https://github.com/zaccharieramzi/git-tuto.git

  4. Create a new branch to add your name to the list of people who have participated to the tutorial. git checkout -b <your-name-or-pseudonym>

  5. Add your name to the participants.csv file. echo '<your-name-or-pseudonym>,\n' >> participants.csv

  6. Stage and commit your changes. git add participants.csv && git commit -m'Added <your-name-or-pseudonym> to the participants file'

  7. Push your local branch to your distant repo. git push origin <the-name-of-your-branch>

  8. Open a new Pull Request (PR): https://github.com/zaccharieramzi/git-tuto/compare. You have an example PR here.

  9. Iterate with feedback.

  10. Once the PR is (squashed and) merged, don't forget to update your local repo (git checkout master && git pull upstream master) and your distant repo (git push origin master).

Continuous Integration tutorial

Overview of Continuous Integration

Once you have understood how the GitHub flow works, you can try to take part in the continuous integration (CI) tutorial. But first, what is CI? CI is a process that can be best described as the continuous testing of the code as parts are added to it. This makes sure that a new addition to the codebase does not alter unexpectedly the behaviour of the code.

Many tools exist but we will here use only Travis CI. To set it up you just need to register to their website, add your repo to the list of watched repositories, and then add a travis config file to your project. The travis config file is a YAML file containing a list of instructions on how to run the tests correctly.

Steps

This assumes you have taken the steps 1-4 of the git tutorial.

  1. Add a file _function.py to the functions folder.

  2. In this file, write a simple function that can be easily tested. An example is my function file. The function doesn't have to be about numbers but can be about all the built-in data structures python provides.

  3. Add a corresponding unit test for this new function. An example of a corresponding unit test is mine.

  4. Perform the steps 6-10 of the git-tutorial with the slight exception that you need to have a more suited commit message.

Contributing

You are free to suggest improvements both on the presentation and on this tutorial using the Issues of this repo. A first good contribution might be for example to add the Contributing guidelines.

git-tuto's People

Contributors

zaccharieramzi avatar anais-a avatar daval-g avatar isab3lla avatar jokyhub avatar lenoush avatar santiagocasas avatar tobias-liaudat avatar aziz-ayed avatar mathrip avatar razhul 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.