Giter Club home page Giter Club logo

learn-git's Introduction

Learn Git Lab

  1. Create a fork of the learn-git repository by clicking "Fork" on the top right.

screen-shot-2015-10-20-at-17 26 49

  1. You'll see a screen like this while GitHub is forking the repo. Forking creates a copy of the original repo on your own GitHub account.

screen-shot-2015-10-20-at-17 21 15-1

  1. Now you have your own copy of the repo! Copy the "clone URL" from the top.

screen-shot-2015-10-20-at-17 22 43

  1. Make a wdi directory. This is where you will put all your work from this class.
➜ mkdir ~/wdi
  1. Use the "clone URL" to clone the repo onto your local machine. Make sure you're in your ~/wdi directory before you clone!
cd ~/wdi
➜  git clone <clone-url>
  1. Change directories into the repo you just cloned (in this example, learn-git).
cd learn-git
  1. Open this project in Atom.
atom .
  1. Back in Atom, open index.html. In the <body> tags, create an <h1> tag with your name and add a gif of your liking in an <img> tag. "Copy Image Address" from giphy.com.

  2. Now that you've changed the repo, it's time to commit your changes. Back in your terminal, type

➜  git status

This shows you the files that have been modified, created, or deleted. Notice that they are listed as untracked.

  1. Now you're ready to add your changes. Type
➜  git add .

Then git status. Notice that your new file has gone from untracked to Changes to be committed.

  1. Next step is committing. Type
➜  git commit -m "modifying index.html"

Then git status. Notice that the new status is Your branch is ahead of 'origin/master' by 1 commit.. This indicates that your the version of the repo on your computer (aka the local version) includes your changes but the version hosted by GitHub (aka the remote version) does not.

  1. To get your changes on to the remote version of the repo, type
➜  git push origin master

Now git status will tell you that Your branch is up-to-date with 'origin/master'. !!!

  1. Once you're done with the assignment and have committed and pushed ALL of your changes to GitHub, it's time to make a pull request back to the original repo. Go to your forked copy of the repo on GitHub, and click the "Pull Request" button.

screen-shot-2015-10-20-at-17 25 24

  1. GitHub takes you to a new view and asks if you want to create the pull request. Click the green button, and that's it - you've now created a pull request to submit this lab!

screen-shot-2015-10-20-at-17 25 49

  1. Repeat! Add some new content to your file and repeat this Git flow.

learn-git's People

Contributors

jlopker avatar kjfrancis avatar

Watchers

James Cloos avatar  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.