Return to Video

Editing Files on GitHub - How to Use Git and GitHub

  • 0:01 - 0:05
    Now that you created your repository on GitHub and it has some commits.
  • 0:05 - 0:07
    Let's take a look at what this looks like on the GitHub website.
  • 0:08 - 0:10
    Like in the Create Your Own Adventure repository,
  • 0:10 - 0:13
    I can see what files are in the repository.
  • 0:13 - 0:18
    Also scrolling back up, I can view the commit history by clicking on commits.
  • 0:19 - 0:22
    This is similar to running git log on the command line.
  • 0:22 - 0:24
    But it shows the history of the repository on GitHub,
  • 0:24 - 0:27
    rather than showing the history of your local repository.
  • 0:27 - 0:30
    So you'll only see changes that have been pushed to GitHub.
  • 0:31 - 0:32
    It's also possible to create and
  • 0:32 - 0:35
    edit plaintext files directly on the GitHub website.
  • 0:36 - 0:40
    Right now I just pushed from my local repository to GitHub, so
  • 0:40 - 0:41
    they have the same content.
  • 0:42 - 0:45
    But I'm going to add some content directly on GitHub so
  • 0:45 - 0:48
    that you can see what happens when you have changes on GitHub that
  • 0:48 - 0:50
    aren't present on your local repository.
  • 0:52 - 0:55
    In practice, this can happen if you make the changes directly on GitHub.
  • 0:55 - 1:00
    But it can also happen if you push changes to GitHub from another computer.
  • 1:00 - 1:03
    Or if there's another person working on your project who
  • 1:03 - 1:04
    pushes changes to GitHub.
  • 1:05 - 1:07
    To create a new file, I'll click this plus sign.
  • 1:09 - 1:11
    I'm going to create a file for my lesson 3 reflections.
  • 1:12 - 1:14
    And I'll the first reflection prompt.
  • 1:14 - 1:16
    You'll be seeing this prompt pretty soon.
  • 1:17 - 1:18
    Now, I'll scroll down.
  • 1:18 - 1:20
    And here I can enter a commit message.
  • 1:21 - 1:26
    The message to go in the first box, and I can use the second box if I want to
  • 1:26 - 1:29
    add a longer description of my commit, but I'll leave that blank.
  • 1:30 - 1:34
    Now on the right side of the screen I can click Commit new file.
  • 1:35 - 1:38
    Now I can see that a new commit has been created.
  • 1:38 - 1:40
    Create file for lesson 3 and add first reflection.
  • 1:41 - 1:45
    Now I'll demonstrate pulling these changes down to my local repository in
  • 1:45 - 1:48
    a minute, but first, I want you to create a new reflections file on GitHub so
  • 1:48 - 1:50
    that you can follow along.
  • 1:50 - 1:52
    You'll see some instructions about how to do that on the next screen.
Title:
Editing Files on GitHub - How to Use Git and GitHub
Description:

04-07 Editing Files on GitHub

more » « less
Video Language:
English
Team:
Udacity
Project:
UD775 - How to Use Git and GitHub
Duration:
01:54

English subtitles

Revisions Compare revisions