GithubHelp home page GithubHelp logo

git_github_assignment's Introduction

Git & GitHub Assignment

This - lab is divided into 2 parts, the first part focuses on Git and the second is real a life example using GitHub.

Practice Git branching

Go to Learn Git Branching and read the introduction.

Solve the exercices following the below order:

  • Main > Introduction Sequence:

    • 1: Introduction to Git commits
    • 2: Branching in Git
    • 3: Merging in Git
  • Remote > Push & Pull -- Git Remotes!

    • 1: Clone Intro
    • 2: Remote branches
    • 3: Git Fetchin'
    • 4: Git Pullin'
    • 5: Faking Teamwork
    • 6: Git Pushin'
    • 7: Diverged History

GitHub practice

In order to complete this part of the lab you will need to work with a partner.

  1. Partner A: Create an empty GitHub repository gitHub-practice.

  2. Partner A: Clone your repository, giving you a local copy of the code on your machine.

  3. Partner B: Fork your partner's repository and you should clone it.

  4. Partner A: Add your partner's GitHub fork as "remote". You can name the remote whatever you want (except origin which would already be taken by your own GitHub repo).


To check everything is properly set-up, type git remote -v,you should have two 'remotes':

  • origin pointing to your repository
  • theRemoteBranch pointing to your partner's repository

  1. Partner A: Make a new directory Practice and create a file index.js and write "GitHub keeps meticulous track of all the changes made to a project".

  2. Partner A: Push your changes to the remote repository.

  3. Partner B: Pull your partner's changes to your local machine.

  4. Partner B: Go to the index file and add the following sentence: "In order to do so, you save these changes by commiting them. In order to commit them, you have to first tell Git to stage them."

  5. Partner A: Pull your partner's changes to your local machine.

  6. Partner A && Partner B: Both of you create their own branch. Add a new folder with a file. Add, commit and push your work to the remote repository.


Branch naming conventions:

  • Choose short and descriptive names
  • Use lowercase in branch names
  • Use hyphens to separate words

  1. Partner A && Partner B: Pull the changes to your local machine. Each of you should have access to your partner's new folder and file.

Bonus

Go back to Learn Git Branching and work on the other exercices.

git_github_assignment's People

Contributors

celinechole 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.