Giter Site home page Giter Site logo

git-tutorial's Introduction

git-tutorial

Basic tutorial & practice environment for first time git-users.

Pre-Setup

  1. Make sure you have Git installed on your computer.
  2. And of course, make sure you have a registered GitHub account.
  3. Finally, have a text editor ready such as Atom or Sublime Text.

Instructions

tldr;
1. Fork the repo into your profile.
2. Clone your own fork in your terminal window.
3. Open kittens.md & make changes.
4. Commit & push your changes.
5. Create a new Pull Request (PR) to merge your changes into kim-nguyenkhn/git-tutorial.

Use the Git Cheat Sheet here if you don't remember the commands.

1. Forking

Forking

Fork the repository. This creates an exact copy of the "git-tutorial" repository into your own profile. After forking, you should be able to view it from your profile's list of repositories.

2. Cloning

Cloning

Cloning - Terminal

Clone the repository. This command puts a copy of the Git repository onto your local machine, so you can work with it.

Use this Linux Command Line Cheat Sheet if you get lost in the terminal.

cd ~/Documents                              (Change directory - Navigate to where you want your local copy to live)
pwd                                         (Show current directory)
git clone <YOUR_FORK_HTTPS_GIT_URL_HERE>    (Clone your fork .git URL)
cd git-tutorial                             (Go into your newly cloned directory)
ls                                          (List files to verify)

3. Making changes

Making Changes

Making Changes

Download Atom or Sublime Text for free. Open kittens.md in your text editor and make your changes.

4. Committing & Pushing

Git Diff

Git Commit

Git Push

Make sure you are in your local "git-tutorial" directory. Use the commands below to verify & publish your changes.

git diff                                (Shows local changes to tracked files)
git add <file>                          (Adds/stages a file to the next commit)
git commit -m "some commit message"     (Commits previously staged changes)
git push                                (Publish local changes into your fork)

5. Creating a Pull Request

New Pull Request

Compare Forks

Click "New Pull Request." Click "Compare Across Forks". Select your fork from the dropdown.

Click the big green "Create Pull Request" button to finish. From there, I'll merge the PR and you should see your resulting changes in kittens.md.

git-tutorial's People

Contributors

kim-nguyenkhn avatar

Watchers

 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.