GithubHelp home page GithubHelp logo

margaretmf / github-playground Goto Github PK

View Code? Open in Web Editor NEW

This project forked from data4democracy/github-playground

0.0 2.0 0.0 24 KB

A safe place to experiment with git & github in a group setting

License: MIT License

Jupyter Notebook 100.00%

github-playground's Introduction

github-playground

A safe place to experiment with git & github in a group setting

Purpose

This is a playground open to anyone looking to practice using git & github in a group project. Feel free to make any and all changes as you test your github chops. One caveat, we ask you please do not change the main readme unless you are making an improvement (P.S. please help the next person and make improvements).

To reiterate this repository is to get people (you!) comfortable with using github do not be scared to try things out!

Give it a try!

  • [Clone] (https://help.github.com/articles/cloning-a-repository/) from your command line git clone https://github.com/Data4Democracy/github-playground.git. Optional: Fork the repo first.
  • Move to main directory `cd github-playground``
  • Check your status git status Should see "On Branch Master" "Your branch is up-to-date with 'origin/master'"
  • Create and checkout a branch to work from: git checkout -b <branch_name> EX: git checkout -b training-branch You can see all branches by typing git branch. Note: we are using training-branch in this example but by the time you follow these instructions someone may have already created training-branch you should create a unique branch.
  • Read about git branching and merging
  • Make a change to an existing file or create a new file and save. EX: echo "print("hello")" > hello.py
  • Check status of your change with git status. Your file should show up under "Untracked Files" EX: hello.py or whatever file you created.
  • Add file to changes git add <filename> or git add . (adds all untracked files -- CAREFUL use with caution) EX: git add hello.py
  • See exactly what changes are staged git diff --cached (or git diff if files are not yet staged)
  • Commit your changes `git commit -m "Hey this is my first commit" Read about how to write good commit messages.
  • Check your remote git remote -v (if you started by cloning a repo from github origin should already be set)
  • Push your changes it to the remote server by typing git push <remote-name> <your-branch> EX git push origin training-branch
  • Open the repo in github and select your branch
  • You should see [compare an pull request]https://help.github.com/articles/about-pull-requests/. This will bring up a summary of your changes and show you what branch you are merging.
  • Edit your message and click submit. Now you should see your pull request show up in the pull requests tab!
  • In a real project your PR may be discussed and reviewed. Stakeholders may suggest changes or updates and (hopefully) eventually your code will be merged!
    • If you need to make changes to the code in your PR you can make the changes EX: echo "print("hello good sir")" > hello.py
    • git diff to check your changes
    • git add hello.py to stage your changes
    • `git commit -m "More formal greeting"
    • Do another git push origin <branch> and changes show automatically show up in the PR (No need to open another PR).

This only scratches the surface of what is possible with git and github. Feel free continue to use this repo when you need to test out (or document for others!) more complicated workflow.

Other resources

Encounter issues?

  • Do not worry, we have all been there!
  • Join #github-help channel on slack and ask for help.
  • DM someone directly. Below users have volunteered to assist with github questions
  • @mattgawarecki, @bstarling, @john
  • Something was not clear or area you struggled with? Submit a Pull request (PR) or open an issue to help us improve!

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.