Return to Video

Tracking Across Multiple Files - How to Use Git and GitHub

  • 0:00 - 0:02
    When writing code in many languages,
  • 0:02 - 0:05
    it's common to have features that span multiple files.
  • 0:05 - 0:08
    Let's say you have a function that currently takes one argument defined in
  • 0:08 - 0:12
    one file and a call to this function in another file.
  • 0:12 - 0:15
    If you want to change this function to take an additional argument,
  • 0:15 - 0:18
    you'll need to simultaneously change code in both files.
  • 0:18 - 0:21
    In many of the non-code oriented version control systems we
  • 0:21 - 0:25
    mentioned previously, files are tracked one at a time.
  • 0:25 - 0:27
    If I open two Google docs and edit both of them,
  • 0:27 - 0:30
    then later I want to find the versions of the files before I made either of
  • 0:30 - 0:34
    the edits, first I have to find the right version in one doc, then dig through
  • 0:34 - 0:38
    the other one's log to find the revision for approximately the same time.
  • 0:38 - 0:40
    That's doable, but really annoying.
  • 0:41 - 0:42
    Let's consider a few situations to
  • 0:42 - 0:46
    think about whether tracking files individually or together makes more sense.
  • 0:46 - 0:48
    For example, competition-style coding.
  • 0:48 - 0:51
    In case you're not familiar with them, most coding competitions just ask you
  • 0:51 - 0:54
    to solve a problem that can be done in a single file.
  • 0:54 - 0:56
    Another example would be an HTML file and
  • 0:56 - 0:59
    a CSS file that together make up a web page.
  • 0:59 - 1:01
    Or maybe some photos you've Photoshopped.
  • 1:01 - 1:04
    Or a novel, split up into multiple chapters.
  • 1:04 - 1:05
    For each of these situations,
  • 1:05 - 1:08
    if you think it makes more sense to track the files together rather than
  • 1:08 - 1:10
    separately, check the box next to it.
Title:
Tracking Across Multiple Files - How to Use Git and GitHub
Description:

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

English subtitles

Revisions Compare revisions