Giter Site home page Giter Site logo

fp_study_notes_hello_github's Introduction

Study Notes

git CLI cheatsheet

Instructions

๐Ÿฅณ Are you coming here for the first time?
Welcome! Follow the Exercises below!

๐Ÿ‘‹ Are you returning here to add or change something in your roster?
Head on down to Returners for tips on how to make this smooth for you and us!

Exercises

1. Fork & Clone

  • Hit 'Fork' on this repo (it's in the top right!)
  • Make sure you are now looking at your fork (it will say <your-github-username>/fp_study_notes_hello_github at the top of the page)
  • Click the green 'Code' button and copy the SSH option if you have already setup git in your terminal, or the HTTPS option if not.
  • Clone down your fork using git clone <what you copied> in your terminal
  • Move into the project folder with cd fp_study_notes_hello_github

2. futureproof your fork

Okay, bad pun but it's true! Throughout the course we will be asking you to contribute to this repo again, so we want to make sure you can always get the latest version to work on

  • Add us as a remote with git remote add upstream https://github.com/getfutureproof/fp_study_notes_hello_github.git
  • Check that all is well so far by running git remote -v - You should see something similar to the following:
origin	  https://github.com/<your-github-username>/fp_study_notes_hello_github.git (fetch)
origin	  https://github.com/<your-github-username>/fp_study_notes_hello_github.git (push)
upstream	https://github.com/getfutureproof/fp_study_notes_hello_github.git (fetch)
upstream	https://github.com/getfutureproof/fp_study_notes_hello_github.git (push)

3. Make a Change

NB: If you have left it a while since doing that fork, clone and adding the upstream remote please sync your repo to our before continuing by running:
git pull upstream main

  • Open it up in a text editor (if you have setup VS Code, you can do this from the command line using code .)
  • Make a change! In the students array, add a new JSON object with a key of "name" and string value of your name and another key of "github" and string value of your GitHub username to <your-cohort>/roster.json and save the file (Windows/Linux: ctrl+s / MacOS: command+s). See example below and in other cohorts' rosters.
  • Check the git status of the project with git status - <your-cohort>/roster.json should show in red as there are unstaged changes
{
  "name": "Loki Laufeyson",
  "github": "VariantL1130"
}

4. Stage your Change

  • Stage your change with git add . (or git add <your-cohort>/roster.json)
  • Check the status again - <your-cohort>/roster.json should now show in green as the changes have been staged but not yet committed

5. Commit your Change

  • Commit your change with git commit -m "add <your-name>". The -m is a flag for 'message' and you must leave a message with every commit!

6. Push your Change

  • Check your git status again - there should be nothing to commit now but an indicator that your local version is one commit ahead of the origin
  • As it suggests, use git push to push up your work to GitHub!

6. Make your first PR

  • You made your own fork of this, now use the GitHub browser interface to see if you can make a Pull Request back to getfutureproof/fp_study_notes_hello_github. Try and request review from @getfutureproof-admin. We will merge your PR when we receive it!

Returners

1. Sync your repo

  • Locate your local repo for this project (clone down your fork again if you deleted it before for any reason) and cd into the folder
  • Run git remote -v and make sure your output is similar to that in Step 2 above
  • Run git pull upstream main to get the latest updates from our central version of the repo

2. Make, Stage, Commit, Push your changes, and open a PR

  • You know how to do this now! If you'd like a recap, check out steps 3,4,5,6 above.

fp_study_notes_hello_github's People

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.