Coder Social home page Coder Social logo

homework1's Introduction

Introduction

This is the repo for homework 1, you have to add a directory and upload a picture of your face.

This is the README file for homework #1. Everyone is going to create a fork of this repository and create a directory whose name is

firstName_lastName

where your last name is separated from your first with an underscore "_". Once you have done this copy a picture of your face into the directory. Next you will send me a pull request from your master to add it to the repo. If you have a team that consists of more than the person who has uploaded the file, please send me a picture of everyone on your team. Name the pictures with your individual names.

Read on for details.

Set up your github account

Set up the github account. The next thing you should do is fork the repository. That means that you create your own copy of the repository in your github account.

img

You don't edit anything on github. Github stores your backup. In order to edit your repo you have to copy it to your machine. This requires you to download git to your local machine. There are several ways to do this.

Mac and windows

Mac

You just need to go this link:

http://git-scm.com/download/mac

Double click on the downloaded file and install in the usual way.

Windows

You just need to go this link:

http://git-scm.com/download/win

Double click on the downloaded file and install in the usual way.

Configure git on your local machine [Don't skip]

On your machine open a terminal

Mac

Left click on launchbad (the icon with the rocket on it). In the search bar type terminal. Left click the terminal and you are there.

Windows

  1. Windows 8 and 8.1

    Right click on the Start button. This opens the power user menu. There is a shortcut for the terminal on that. Left click on it and you are there. Here is a larger article on this:

    http://pcsupport.about.com/od/windows-8/a/command-prompt-windows-8.htm

  2. Windows 7

    Click on the Start button. In the search box, type the following:

    command

    Click on Command Prompt in the search results listing. Here is a larger reference.

    http://pcsupport.about.com/od/windows7/a/command-prompt-windows-7.htm

Decide where to place your files

Mac OS X

Your documents are in:

/Users/<your name>/Documents

In the terminal type:

cd Documents

To check where you are type:

pwd

This returns the present working directory.

Windows

Your Documents are in C:\Users\\Documents. In the terminal type:

cd Documents

Set global git variables

Tell Git your name so your commits will be properly labeled. Type everything after the $ here:

git config –global user.name "Your Name"

Tell Git the email address that will be associated with your Git commits. The email you specify should be the same one you used to sign up for GitHub.

git config –global user.email "YOUR EMAIL ADDRESS"

Clone the repository from your github account to your local machine

Now go back to your browser and open up the repo that you forked. On the right side of the page near the top, there is a box under settings. In that box is the URL of your fork. Here is a picture.

img

Now that you know what you are looking for. Copy it and clone it by typing:

git clone [email protected]:<your_github_username>/homework1.git

Now you have your own copy of the repo both on your machine and in your github account. You can look at any of the files.

Master vs. branch

You actually have a copy of the master on your machine. When you add something for the first time, you should not add to the master you should make changes to your own branch. Usually the branch name is the topic. In this case use your first name. Type:

git branch <first_name>

We can see all of the branches by typing:

git branch

The star means that we are still on the master branch.

Switch branches

To switch branches type:

git checkout <first_name>

Create a directory

Create a directory with your first and last name from the command line:

mkdir <firstName_LastName>

Copy your homework into that directory

You can use the command line or a gui to copy your picture into the directory you just created.

Add your homework to your branch

To add your homework to your branch. You will do this by adding all files in the directory to your branch by typing:

git add .

Commit your local changes

You should save or commit your changes with a message. Type the following:

git commit -m "added my homework."

or type:

git commit -m "added my homework and team."

To update your copy on github you have to push your changes. This only did the merge on the local side.

See everyone's changes

Configure an upstream master

Git does not automatically know where you want to pull from. To see where git is pulling from, type:

git remote -v

The "-v" is a common command line flag for verbose. Because you forked both the (fetch) where you pull from and where you push to (push) are the same. Now specify a new upstream repository that will be synced by the fork.

git remote add upstream git://github.com/CSCI391/homework1.git

Sync the fork

To see everyone's accepted changes to the master, you have to pull the upstream master. This requires a fetch command. Make sure that you have commited your changes. Type:

git fetch upstream

you have now pulled the changes from my branch to your local machine. The next step is to merge it into your master branch.

git checkout master

and to incorporate the changes on your local master, type:

git merge upstream/master

You will want to save those to your github account as well. So to finish, type:

git push origin <first_name>

Thanks

homework1's People

Contributors

dkaterenchuk avatar eric-dagobert avatar evanmisshula avatar minmasophia avatar nickcalabs avatar palomemo avatar sg622 avatar xiuyanni avatar

Watchers

 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.