Code Monkey home page Code Monkey logo

gitlab's Introduction

Git & Github Lab

Motivation

The intention of this lab is to "git" you comfortable with using the version control system Git and Github. We will walk through a typical workflow using these tools.

Before getting started, you need to set up your SSH keys with Github. If you haven't set them up yet, follow the steps on Github's guide, Generating SSH Keys.

Lab

I. Fork this Repository

####ADD GIF SHOWING HOW TO FORK REPO

Find the button at the top of this page labeled Fork. When you click it, Github creates a copy of the repository in your own account. You can freely make changes on this copy without affecting the original repository. Clicking on it will 'fork' the repository, giving you a copy of it that's yours.

II. Clone the Repository Locally

Now that you've got your own copy of the repository in your Github account, make a clone of it on your computer. That way you can make changes locally, before pushing them to the remote repository on Github.

Hint
git clone PUT_THE_REPO_URL_HERE

III. Checkout a New Branch

In your terminal, change into the directory where you cloned the repo. Checkout a new branch. You can name it whatever you'd like. This branch will your development branch, where you can make changes while keeping the original verison on the master branch.

Hint
git checkout -b BRANCH_NAME

This command is just shorthand for git branch BRANCH_NAME followed by git checkout BRANCH_NAME.

IV. Make Some Changes

Now that you're on a branch other than master, make an about_me.html. You can edit the content to be whatever you'd like, but be creative. Maybe use something like this as a template.

V. Add the Changes

Once you've finished making any changes you'd like, add those changes to Git. This tells Git that these are changes you'd like to record on your next commit. If you aren't sure what you changed, you can check by using git status.

Hint

git add THE_CHANGES_YOU_MADE.

VI. Commit the Changes

With all of your changes made, it's time to commit them! Commiting adds your changes to the Git log and let's you see what you changed.

Hint
git commit -m "PUT YOU MESSAGE HERE."

I personally like to have it start with a present tense action verb. Think of something along the lines of: 'add new aboutme html page'.

V. Push Your Changes to Github

Push the changes on your branch to your remote repository.

Hint
git push origin YOUR_BRANCH_NAME

VI. Make a Pull Request on the Original Repository

Go to github and make a pull request. This is a request to merge your changes into the master branch in the original repository. Your changes can be reviewed, commented on, and updated before they are integrated into the main code.

####ADD GIF SHOWING HOW TO MAKE PR

Now that you're done...

Take a chance to look over this blog post on merge conflicts in git. The author of the blog post is Cho Kim a WDI instructor here.

Also feel free to check out this dev handbook.

gitlab's People

Contributors

desa avatar

Watchers

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