Git Product home page Git Product logo

marvel-movies's Introduction

Learning Git workflows: Marvel Movies lesson

Demo for Juniata's IT-342 class. Made in memorial of Stan Lee.

This lesson is to be done with at least one peer to demonstrate remote Git workflows.

Lesson 1: preparation

On your system, please make sure you have Git installed on your system and a text editor of your choosing. Please configure your Github profile to use SSH keys.

Before starting the lessons, please load a terminal and Github. Email [email protected] with the Github usernames of those participating. I'll send an invite you will need to accept before assignment/merging is possible.

Lesson 2: cloning repositories

Repositories are self-contained. You can have one on your local and one that would be considered a "remote".

Github repositories are often remotes to local clones of the repository. By cloning, you automatically establish a connection to a remote repository.

On your system, run the following commands to clone to your local.

  1. Go to your home directory: cd ~
  2. Clone with git: git clone [email protected]:nerdstein/marvel-movies.git

You should now have a marvel-movies directory.

Lesson 3: issues

Making issues is a critical way to collaborate on improvements to projects.

On github, perform the following steps.

  1. Click on the issues tab of the repository
  2. Click on "New Issue" button
  3. Describe your proposed change and save

Lesson 4: working on an issue

  1. assign yourself an issue and note the issue number, e.g. 4
  2. on your local, make a new branch: git checkout -b issue-4 where 4 is the issue number
  3. perform the work described in the issue on your local
  4. commit the work: git commit -a -m "Issue 4: provide a description of your change
  5. verify the name of your remote repo: git remote -v, you should see origin
  6. push your work to a remote branch on Github: git push origin issue-4
  7. go to Github, you should see a "issue-4, compare and make pull request" message with a button

Lesson 5: reviewing an issue

  1. when you have an open a pull request, assign it to your peer to review by opening the pull request and clicking the "gear" next to "assign" on the right column
  2. have your peer review your change through the "pull requests" tab on github
  3. your peer should submit a review to accept or reject changes
  4. once approved, your peer should merge the pull request

While this link may have delays, you should see your change at this link.

Lesson 6: retrieving changes

Changes can be merged in at any time in the remote repository. It is best to frequently pull changes.

New changes

When you start working on a new issue, it's best to load the most recent change to avoid any remote conflicts.

  1. Load the default master branch on your local: git checkout master
  2. Fetch all changes from remotes: git fetch --all
  3. Synchronize your local master with the remote branch: git reset --hard origin/master

Loading changes before merging

Changes to the upstream branch can happen while you are working on your changes. This often means changes cannot be merged when a pull request is made.

  1. Have your peer merge a change while you are working on an issue on your local system
  2. Commit your changes: git commit -a -m "Issue 4: describe your work"
  3. Fetch all changes from remotes: git fetch --all
  4. Rebase on the remote master branch: git rebase origin/master, note: this can be tricky if changes are made to the same files.
  5. You may need to force push your rebase since the log of commits changed: git push origin issue-4 --force

marvel-movies's People

Contributors

nerdstein avatar joelpheasant avatar

Watchers

James Cloos avatar  avatar  avatar

marvel-movies's Issues

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.