diff --git a/text1.txt b/text1.txt index 9cdd5be..d464a86 100644 --- a/text1.txt +++ b/text1.txt @@ -1,49 +1,49 @@ -October arrived, spreading a damp chill over the grounds and into the castle. Madam Pomfrey, the nurse, was kept busy by a sudden -spate of colds among the staff and students. Her Pepperup potion worked instantly, though it left the drinker smoking at the ears -for several hours afterward. Ginny Weasley, who had been looking pale, was bullied into taking some by Percy. The steam pouring from -under her vivid hair gave the impression that her whole head was on fire. +October(>_<)arrived,(>_<)spreading(>_<)a(>_<)damp(>_<)chill(>_<)over(>_<)the(>_<)grounds(>_<)and(>_<)into(>_<)the(>_<)castle.(>_<)Madam(>_<)Pomfrey,(>_<)the(>_<)nurse,(>_<)was(>_<)kept(>_<)busy(>_<)by(>_<)a(>_<)sudden(>_<) +spate(>_<)of(>_<)colds(>_<)among(>_<)the(>_<)staff(>_<)and(>_<)students.(>_<)Her(>_<)Pepperup(>_<)potion(>_<)worked(>_<)instantly,(>_<)though(>_<)it(>_<)left(>_<)the(>_<)drinker(>_<)smoking(>_<)at(>_<)the(>_<)ears(>_<) +for(>_<)several(>_<)hours(>_<)afterward.(>_<)Ginny(>_<)Weasley,(>_<)who(>_<)had(>_<)been(>_<)looking(>_<)pale,(>_<)was(>_<)bullied(>_<)into(>_<)taking(>_<)some(>_<)by(>_<)Percy.(>_<)The(>_<)steam(>_<)pouring(>_<)from(>_<) +under(>_<)her(>_<)vivid(>_<)hair(>_<)gave(>_<)the(>_<)impression(>_<)that(>_<)her(>_<)whole(>_<)head(>_<)was(>_<)on(>_<)fire.(>_<) -Raindrops the size of bullets thundered on the castle windows for days on end; the lake rose, the flower beds turned into muddy streams, -and Hagrid's pumpkins swelled to the size of garden sheds. Oliver Wood's enthusiasm for regular training sessions, however, was not -dampened, which was why Harry was to be found, late one stormy Saturday afternoon a few days before Halloween, returning to Gryffindor -Tower, drenched to the skin and splattered with mud. +Raindrops(>_<)the(>_<)size(>_<)of(>_<)bullets(>_<)thundered(>_<)on(>_<)the(>_<)castle(>_<)windows(>_<)for(>_<)days(>_<)on(>_<)end;(>_<)the(>_<)lake(>_<)rose,(>_<)the(>_<)flower(>_<)beds(>_<)turned(>_<)into(>_<)muddy(>_<)streams,(>_<) +and(>_<)Hagrid's(>_<)pumpkins(>_<)swelled(>_<)to(>_<)the(>_<)size(>_<)of(>_<)garden(>_<)sheds.(>_<)Oliver(>_<)Wood's(>_<)enthusiasm(>_<)for(>_<)regular(>_<)training(>_<)sessions,(>_<)however,(>_<)was(>_<)not(>_<) +dampened,(>_<)which(>_<)was(>_<)why(>_<)Harry(>_<)was(>_<)to(>_<)be(>_<)found,(>_<)late(>_<)one(>_<)stormy(>_<)Saturday(>_<)afternoon(>_<)a(>_<)few(>_<)days(>_<)before(>_<)Halloween,(>_<)returning(>_<)to(>_<)Gryffindor(>_<) +Tower,(>_<)drenched(>_<)to(>_<)the(>_<)skin(>_<)and(>_<)splattered(>_<)with(>_<)mud.(>_<) -Even aside from the rain and wind it hadn't been a happy practice session. Fred and George, who had been spying on the Slytherin team, -had seen for themselves the speed of those new Nimbus Two Thousand and Ones. They reported that the Slytherin team was no more than seven -greenish blurs, shooting through the air like missiles. +Even(>_<)aside(>_<)from(>_<)the(>_<)rain(>_<)and(>_<)wind(>_<)it(>_<)hadn't(>_<)been(>_<)a(>_<)happy(>_<)practice(>_<)session.(>_<)Fred(>_<)and(>_<)George,(>_<)who(>_<)had(>_<)been(>_<)spying(>_<)on(>_<)the(>_<)Slytherin(>_<)team,(>_<) +had(>_<)seen(>_<)for(>_<)themselves(>_<)the(>_<)speed(>_<)of(>_<)those(>_<)new(>_<)Nimbus(>_<)Two(>_<)Thousand(>_<)and(>_<)Ones.(>_<)They(>_<)reported(>_<)that(>_<)the(>_<)Slytherin(>_<)team(>_<)was(>_<)no(>_<)more(>_<)than(>_<)seven(>_<) +greenish(>_<)blurs,(>_<)shooting(>_<)through(>_<)the(>_<)air(>_<)like(>_<)missiles.(>_<) -As Harry squelched along the deserted corridor he came across somebody who looked just as preoccupied as he was. Nearly Headless Nick, -the ghost of Gryffindor Tower, was staring morosely out of a window, muttering under his breath, ". . . don't fulfill their -requirements . . . half an inch, if that . . ." +As(>_<)Harry(>_<)squelched(>_<)along(>_<)the(>_<)deserted(>_<)corridor(>_<)he(>_<)came(>_<)across(>_<)somebody(>_<)who(>_<)looked(>_<)just(>_<)as(>_<)preoccupied(>_<)as(>_<)he(>_<)was.(>_<)Nearly(>_<)Headless(>_<)Nick,(>_<) +the(>_<)ghost(>_<)of(>_<)Gryffindor(>_<)Tower,(>_<)was(>_<)staring(>_<)morosely(>_<)out(>_<)of(>_<)a(>_<)window,(>_<)muttering(>_<)under(>_<)his(>_<)breath,(>_<)".(>_<).(>_<).(>_<)don't(>_<)fulfill(>_<)their(>_<) +requirements(>_<).(>_<).(>_<).(>_<)half(>_<)an(>_<)inch,(>_<)if(>_<)that(>_<).(>_<).(>_<)."(>_<) -"Hello, Nick," said Harry. +"Hello,(>_<)Nick,"(>_<)said(>_<)Harry.(>_<) -"Hello, hello," said Nearly Headless Nick, starting and looking round. He wore a dashing, plumed hat on his long curly hair, -and a tunic with a ruff, which concealed the fact that his neck was almost completely severed. He was pale as smoke, and Harry -could see right through him to the dark sky and torrential rain outside. +"Hello,(>_<)hello,"(>_<)said(>_<)Nearly(>_<)Headless(>_<)Nick,(>_<)starting(>_<)and(>_<)looking(>_<)round.(>_<)He(>_<)wore(>_<)a(>_<)dashing,(>_<)plumed(>_<)hat(>_<)on(>_<)his(>_<)long(>_<)curly(>_<)hair,(>_<) +and(>_<)a(>_<)tunic(>_<)with(>_<)a(>_<)ruff,(>_<)which(>_<)concealed(>_<)the(>_<)fact(>_<)that(>_<)his(>_<)neck(>_<)was(>_<)almost(>_<)completely(>_<)severed.(>_<)He(>_<)was(>_<)pale(>_<)as(>_<)smoke,(>_<)and(>_<)Harry(>_<) +could(>_<)see(>_<)right(>_<)through(>_<)him(>_<)to(>_<)the(>_<)dark(>_<)sky(>_<)and(>_<)torrential(>_<)rain(>_<)outside.(>_<) -"You look troubled, young Potter," said Nick, folding a transparent letter as he spoke and tucking it inside his doublet. +"You(>_<)look(>_<)troubled,(>_<)young(>_<)Potter,"(>_<)said(>_<)Nick,(>_<)folding(>_<)a(>_<)transparent(>_<)letter(>_<)as(>_<)he(>_<)spoke(>_<)and(>_<)tucking(>_<)it(>_<)inside(>_<)his(>_<)doublet.(>_<) -"So do you," said Harry. +"So(>_<)do(>_<)you,"(>_<)said(>_<)Harry.(>_<) -"Ah," Nearly Headless Nick waved an elegant hand, "a matter of no importance. . . . It's not as though I really wanted to join. . . . -Thought I'd apply, but apparently I 'don't fulfill requirements' -" +"Ah,"(>_<)Nearly(>_<)Headless(>_<)Nick(>_<)waved(>_<)an(>_<)elegant(>_<)hand,(>_<)"a(>_<)matter(>_<)of(>_<)no(>_<)importance.(>_<).(>_<).(>_<).(>_<)It's(>_<)not(>_<)as(>_<)though(>_<)I(>_<)really(>_<)wanted(>_<)to(>_<)join.(>_<).(>_<).(>_<).(>_<) +Thought(>_<)I'd(>_<)apply,(>_<)but(>_<)apparently(>_<)I(>_<)'don't(>_<)fulfill(>_<)requirements'(>_<)-"(>_<) -In spite of his airy tone, there was a look of great bitterness on his face. +In(>_<)spite(>_<)of(>_<)his(>_<)airy(>_<)tone,(>_<)there(>_<)was(>_<)a(>_<)look(>_<)of(>_<)great(>_<)bitterness(>_<)on(>_<)his(>_<)face.(>_<) -"But you would think, wouldn't you," he erupted suddenly, pulling the letter back out of his pocket, "that getting hit forty-five -times in the neck with a blunt axe would qualify you to join the Headless Hunt?" +"But(>_<)you(>_<)would(>_<)think,(>_<)wouldn't(>_<)you,"(>_<)he(>_<)erupted(>_<)suddenly,(>_<)pulling(>_<)the(>_<)letter(>_<)back(>_<)out(>_<)of(>_<)his(>_<)pocket,(>_<)"that(>_<)getting(>_<)hit(>_<)forty-five(>_<) +times(>_<)in(>_<)the(>_<)neck(>_<)with(>_<)a(>_<)blunt(>_<)axe(>_<)would(>_<)qualify(>_<)you(>_<)to(>_<)join(>_<)the(>_<)Headless(>_<)Hunt?"(>_<) -"Oh - yes," said Harry, who was obviously supposed to agree. +"Oh(>_<)-(>_<)yes,"(>_<)said(>_<)Harry,(>_<)who(>_<)was(>_<)obviously(>_<)supposed(>_<)to(>_<)agree.(>_<) -"I mean, nobody wishes more than I do that it had all been quick and clean, and my head had come off properly, I mean, -it would have saved me a great deal of pain and ridicule. However -" Nearly Headless Nick shook his letter open and read -furiously: "'We can only accept huntsmen whose heads have parted company with their bodies. You will appreciate that it would be -impossible otherwise for members to participate in hunt activities such as Horseback Head-Juggling and Head Polo. It is with the -greatest regret, therefore, that I must inform you that you do not fulfill our requirements. With very best wishes, -Sir Patrick Delaney-Podmore.'" +"I(>_<)mean,(>_<)nobody(>_<)wishes(>_<)more(>_<)than(>_<)I(>_<)do(>_<)that(>_<)it(>_<)had(>_<)all(>_<)been(>_<)quick(>_<)and(>_<)clean,(>_<)and(>_<)my(>_<)head(>_<)had(>_<)come(>_<)off(>_<)properly,(>_<)I(>_<)mean,(>_<) +it(>_<)would(>_<)have(>_<)saved(>_<)me(>_<)a(>_<)great(>_<)deal(>_<)of(>_<)pain(>_<)and(>_<)ridicule.(>_<)However(>_<)-"(>_<)Nearly(>_<)Headless(>_<)Nick(>_<)shook(>_<)his(>_<)letter(>_<)open(>_<)and(>_<)read(>_<) +furiously:(>_<)"'We(>_<)can(>_<)only(>_<)accept(>_<)huntsmen(>_<)whose(>_<)heads(>_<)have(>_<)parted(>_<)company(>_<)with(>_<)their(>_<)bodies.(>_<)You(>_<)will(>_<)appreciate(>_<)that(>_<)it(>_<)would(>_<)be(>_<) +impossible(>_<)otherwise(>_<)for(>_<)members(>_<)to(>_<)participate(>_<)in(>_<)hunt(>_<)activities(>_<)such(>_<)as(>_<)Horseback(>_<)Head-Juggling(>_<)and(>_<)Head(>_<)Polo.(>_<)It(>_<)is(>_<)with(>_<)the(>_<) +greatest(>_<)regret,(>_<)therefore,(>_<)that(>_<)I(>_<)must(>_<)inform(>_<)you(>_<)that(>_<)you(>_<)do(>_<)not(>_<)fulfill(>_<)our(>_<)requirements.(>_<)With(>_<)very(>_<)best(>_<)wishes,(>_<) +Sir(>_<)Patrick(>_<)Delaney-Podmore.'"(>_<) -Fuming, Nearly Headless Nick stuffed the letter away. +Fuming,(>_<)Nearly(>_<)Headless(>_<)Nick(>_<)stuffed(>_<)the(>_<)letter(>_<)away.(>_<) -"Half an inch of skin and sinew holding my neck on, Harry! Most people would think that's good and beheaded, but oh, no, -it's not enough for Sir Properly Decapitated-Podmore." +"Half(>_<)an(>_<)inch(>_<)of(>_<)skin(>_<)and(>_<)sinew(>_<)holding(>_<)my(>_<)neck(>_<)on,(>_<)Harry!(>_<)Most(>_<)people(>_<)would(>_<)think(>_<)that's(>_<)good(>_<)and(>_<)beheaded,(>_<)but(>_<)oh,(>_<)no,(>_<) +it's(>_<)not(>_<)enough(>_<)for(>_<)Sir(>_<)Properly(>_<)Decapitated-Podmore."(>_<) diff --git a/text2.txt b/text2.txt index d247cd8..d889acd 100644 --- a/text2.txt +++ b/text2.txt @@ -1,44 +1 @@ -Quotes from The Fresh Prince of Bel-Air: - -Uncle Phil: "We Eat Here Later. You Eat Here Never. -Jazz: "Looks Like You Eat Here Often." - -Geoffrey: "Quite Right Sir. You Threw Him On The Lawn, He ROLLED Into The Street." - -Geoffrey: "Correct, But You Overlooked One Fact. I Have No Life." - -Uncle Phil: "You Find Geoffrey And You Bring Him Back Or They'll Never Find Your Bodies. I'm A Judge, I Can Make It Happen." - -Geoffrey: "Ou Ou Ou, Can I Get It For You?" - -Girl: "Excuse Me, What's A Nine-Letter Word For Terrific?" -Will: "That's Easy: Will Smith." - -Uncle Phil: "This Fat-Free Cake Isn't Bad, Geoffrey." -Geoffrey: "Sir, That's A Sponge." - -Vivian: "That Man Is On Thin Ice!" -Geoffrey: "I'll Alert The Fish." - -Carlton: "I Thought Ashley Was In Bed." -Will: "Yeah, And You Also Thought Tupac Shakur Was A Jewish Holiday." - -Carlton: "Dad, Don't Do Anything Stupid! You Haven't Updated Your Will Yet." - -Will: "So You're Saying The Only Reason I Loved Her Is Cause She's Rich And Let Me Sponge Off Of Her?" -Phil: "Yes." -Will: "Then, I Love You Too, Uncle Phil." - -Carlton: "Big Poopie." -Uncle Phil: "What Did You Say?" -Carlton: "I Say... Uh... Beg, Puppy. To My Pretend Dog, Ernie. Fetch, Ernie. He's Gone Now." - -Carlton: "Steffi, Go Home. You're Not Age-Appropriate For This Party. (Carlton Puts On A Duck Floatie) I'm Going Swimming." - -Vivian: "How Was The Flight, Honey?" -Will: "Yo, The Plane Ride Was Stupid. I Was Up In The First-Class." -Phil: "Excuse Me?" Will: "No, I'm Saying The Plane Ride Was Dope." -Philip: "Excuse Me?" -Will: "No... Stupid, Dope, It's Not What You Think. How Would I Say This... [In A Nerdy Voice] The Flight Was Really Neat." - -Will: "Oh My God, Carlton! What's That Hideous Thing Growing Out Of Your Neck?... Ah, Never Mind. It's Just Your Head." + diff --git a/text3.txt b/text3.txt new file mode 100644 index 0000000..60b6fad --- /dev/null +++ b/text3.txt @@ -0,0 +1,96 @@ +Introduction +Activity 6: Git and GitHub +In this activity, you will clone a working GitHub repository and perform some basic tasks that are common in using GitHub and git as a community repository. Note that git and GitHub are extremely powerful and only a very small subset of the capabilities are shown in this exercise. +Make a fork of an existing GitHub repository to your GitHub account +● Find an existing repository that you want to work on. For our purposes, use the repository at https://github.com/HeidiHendrickson/github_tutorial (i.e., go to that link). +● Click on the “Fork” button on the upper right corner of the screen: + ● This will create a clone of the repository into your GitHub account and put your active browser page on your repository. This will allow you to make your own changes to the content of the repository. + +Make a clone on your laptop machine +To clone your repository onto your computer: +● You will need to know the repository address (or remote address) to take the information +from. Go to your repository in GitHub on your browser and click on the green “Code” button. Once the pop-up window opens, click on the clipboard icon to copy the URL into the clipboard (make sure to grab the URL and not the ssh address): + ● Now, go to your Terminal or Anaconda Powershell Prompt window. We will make a clone of the repository in GitHub to your local machine. We will make a folder in your (Desktop) folder to make sure we know where it is. Type: +cd (Desktop)/molssi-day2 git clone +where you should substitute the location of your desktop folder for (Desktop). Also, should be replaced with the url you obtained in the previous step. (You can paste it into the command window or type it from the browser window – in the example abovetheishttps://github.com/HendricksonH/github-tutorial.) Donotusethe url in the picture above! Use the one for your repository! + +● You should now have a copy of the repository on your computer. To get into the directory where the files are located, type: +cd github-tutorial +If you then type: +ls +into the command window, you will get a list of the files that are in the repository. +It is important here to note that you have not just made a copy of the files onto your local machine, but also into the local git repository on your computer! So, for a while, we are going to work on your local files and on the local git repository. Once we have things like we want them in the local git repository, we will make the changes into GitHub. +Making a change in a file +The next thing we will do is to make some changes in a couple of the files and commit them into the local git repository. Note that we can make as many changes to the files as we want without any fear of changing the repository until we use a “git” command. Even then, there are ways (that we won’t go into for this short tutorial) to recover from most commands. So, have no fear of trying things out! This is how you learn! +● Using a text editor (like VS Code), open up the file text1.txt. +● Make any changes that you like (e.g., change words, delete sentences, add text, etc.). +● Save and close the file. +● Open up the file text2.txt and again make any changes that you like, save and close +the file. +At this point, you have only made changes to your local files, but not to the local git repository. +Now, let’s learn a command that is very useful to get an overall view of what has changed from your files and the local git repository. Type: +git status +You will see something similar to the following: + + Note that it tells us that we have two files that have been modified. They have not yet been added into the local repository. Also note that while git recognizes that text1.txt and text2.txt have been modified, they are “not staged for commit”. It turns out that we actually have three local areas we need to be concerned about: the local files, the local git repository and a git staging area that we haven’t discussed before. Think of the staging area as a place where we let git know which files we are going to commit to the local repository (because we may not want to commit all of the files that we are going to make changes on). To add these files to the staging area, we type: +git add text1.txt text2.txt git status +This should give us: + + The two files are now in the staging area and could be committed to the local repository. But before we do that, let’s add another file. +Add a file +Let’s say that we decide we want to add another file that has some of our other favorite text in it to share with our fellow students. So, let’s make another file. +● Open your text editor (if it is not already open), and open a new file. +● Put in any text that you would like. +● Save the file as text3.txt and close it. (Make sure that the file that you created is in +the directory with the other local files.) +In the command window, type “git status”. You should see something like this: + + Note that in addition to the two files that we modified and that are in the staging area, we now have an “untracked file” text3.txt. It is untracked because git knows nothing about it! So, we need to tell git that we want this file to be part of the repository. To do that, type: +git add text3.txt git status +You should see something like: + + Note now that text3.txt has been added to the staging area and is ready to be committed. It has not yet been committed, though. +Committing changes to the local repository +Now that we have all of the changes and additions that we want into the staging area, we are ready to put those changes into the repository. This is done by typing: +git commit -m "some simple modifications and additions" +The text in the quotes can be whatever message that you would like to give. The message should usually be more descriptive than this one is – the idea is to give you some idea of what the changes were. Now type “git status” again. You should see something like: + + Note that it says that there is nothing to commit. It also says, “Your branch is ahead of ‘origin/main’ by 1 commit.” This is saying that you have made 1 commit to your local repository (a “branch” of your GitHub repository) that is not in your GitHub repository (origin/main). +We could repeat making changes to our files and committing changes to our local repository until we have made all of the changes that we want. We can do as many “git commit” commands as we need to get the files as we want them. Once this is done, we are ready to push our changes back up to the GitHub repository. +Create a Personal Access Token +In order to push your changes to the GitHub repository, you will first need to create a Personal Access Token, which for the command-line interface, is used along with your username instead of your password. More information on creating a Personal Access Token can be found here. +To create your Personal Access Token, go to your GitHub account in your browser, click on your profile icon and select Settings, as shown below: + + In the Settings section, scroll down until you see the <> Developer Settings in the left sidebar, and click <> Developer Settings. +In the <> Developer Settings section, click on Personal access tokens in the left sidebar, as shown below. Click the Generate new token button to generate a token. + + When creating your token, give your token a name if you like, choose an expiration date, check the repo box, then click Generate new token. +When your token is generated, copy the token to the clipboard. The token is like a password, so you should take care of it as such! This means the token should not be shared with anyone else! +Once you have your token, you are ready to push your changes to the GitHub repository. + +Push our changes from our local git repository up to our GitHub account +Type: +git push origin main +origin means the place where the local repository was taken from – our GitHub account in this case – and main means the local branch that we want to push. By default, your local git repository is called main (if the repo was first created on GitHub). +If you still aren’t getting anything, type: +GIT_CURL_VERBOSE=1 git push origin main +and contact one of the instructors for help. +You can check to see if your GitHub repository has been updated by going to the browser with your GitHub repository in it and refreshing the browser screen. You should see the message for the commit on text1.txt and text2.txt, and you should also see the new file text3.txt. +Requesting your changes be made to the upstream repository (the one you originally forked from) +Your changes are now in your GitHub repository. However, if you have made changes that you would like to get back into the upstream repository (the one you originally forked from), you will now need to do a pull request. This is basically notifying the originator of the upstream repository that you would like some changes merged into the upstream repository. The originator can decide whether or not to include some or all of the changes into the upstream repository. To start the pull request: +● In your browser, go to the upstream GitHub repository: https://github.com/HeidiHendrickson/github_tutorial. [In practice, you can also do this from your repository, although things will look a bit different.] +● Click on the “Pull requests” tab and then the “New pull request” button: + + +● On the resulting page, click the “compare across forks” link: + ● Next, you need to pick a fork to compare against. Click on “head repository:” and choose your fork: + +● Next, click on the green “Create pull request” button: +● On the resulting page, write a title for your pull request and a brief description of the changes you made. Then click on the green “Create pull request” button (yes, again): + + Now it will be up to the originator of the upstream repository to decide whether to merge your code into his/her repository. +Final thoughts +This is a very brief introduction to using git and GitHub and doesn’t show all of the many features that are important when using repositories. In particular, it doesn’t show how to resolve conflicts or directly merge new changes from the upstream repository into your local repository on your computer. This is very important when working on collaborative projects where many people are contributing to the software on a regular basis. You will need to keep your working repository up to date with the upstream repository. +Some tutorials that may be of use to you if you want to take your skills further are: +http://swcarpentry.github.io/git-novice/ https://guides.github.com/activities/hello-world/ https://gist.github.com/jaseemabid/1321592 (a list of git and GitHub resources) https://docs.github.com/en/get-started/quickstart/git-and-github-learning-resources +