Code Monkey home page Code Monkey logo

shakespeare-git-practice's Introduction

shakespeare-git-practice

Training area for those new to git. Fork it and clone from your own fork.

Text based on Project Gutenberg's plain text version of The Tragedy of Romeo and Juliet by William Shakespeare.

Install Git Software

Go here: http://git-scm.com/downloads

Pick your operating system and following the install directions.

Learning Resources

Git Beginners Challenge

Picture Guide to Commands

Git Tower E-Book Focus on Chapters 1-4.

Git-Scm E-Book Focus on Chapters 1, 2, 3, 5, 6.

Git Branching Game

Article-Length Quick-Start

Getting Started

Make sure you are working from a Fork of the git repository.

This means you already have a github account, and you pressed the "Fork" button while viewing https://github.com/jennybrown8/shakespeare-git-practice on the web.

Then you went to your forked copy, so the web address changed to something like: https://github.com/your.name/shakespeare-git-practice

Then in the lower right of the web page, look for the "clone url" piece. As long as you remember your username and password, you can use the http url.

Copy the url to the clipboard. Then on your own computer, bring up the git bash command line, or your choice of graphical git client.

Run the command:

git clone thatUrl

This gives you a copy of the files to get started.

Type in:

cd shakespeare-git-practice

git status

to see that you have no local changes yet. You should get:

 # On branch master
 nothing to commit (working directory clean)

Instructions for Work

Each scene directory has a list of files which are pieces of that scene, but they're not in any good order. This is similar to the results of putting a book through a scanner one page at a time. Your job is to put them back together correctly as one file.

Create a new file in each scene directory, named Scene.txt

Run git status to see that it has an untracked file. Type:

git add scene1/Scene.txt

git add scene2/Scene.txt

git add scene3/Scene.txt

git status

This has added the new file to the git staging area. You can commit these empty files as a starting point, and write a message explaining what you did.

git commit -m "Empty placeholders for scenes"

git status

Now you're ready to start copying and pasting in the scene contents for scene 1.

Do a small amount of work, and then git commit your changes.

git diff

git add .

git status

git commit -m "Added the third section of the scene"

Then do a small amount of work, and git commit the next set of changes.

git add .

git status

git commit -m "Added the fourth section of the scene"

When you finish the scene, git commit and git push.

git add .

git status

git commit -m "Finished the scene"

git push

If you are working with a partner, divide the scenes between you, and you should both push at the end of your scenes. Note that you'll need to git pull to bring down a copy of your partner's changes, before you can push your own.

git status

git pull

git status

git push

Make sure you trade back and forth several times, as well as work simultaneously several times, when working with a partner.

You can also work solo, although you won't see as interesting of interactions with multiple commits.

These instructions are just a starting point. You can try out changes of your own as well.

What happens if you rename the Scene.txt file to something different, like FullScene.txt? Remember to git add FullScene.txt before you commit.

What happens if both of you change the same line of the same scene file at the same time (and make it say different things), and you both try to commit and push your changes? This will cause a merge conflict. You'll need to modify the file one more time, then follow the on-screen instructions to finish the commit process.

How can you view your commit history? Try out the following.

git log -2

git log

git show 188713b

You should also explore branching and merging, once you understand the basics of the commit history and pushing/pulling.

shakespeare-git-practice's People

Contributors

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