Return to Video

Git Workspace - How to Use Git and GitHub

  • 0:00 - 0:03
    Before you continue to the next lesson, I'd like to encourage you to
  • 0:03 - 0:06
    take a minute to set up a Git workspace that will work well for you.
  • 0:06 - 0:09
    If you take the time to configure a few things about Git,
  • 0:09 - 0:12
    it can be much easier and more pleasant to use.
  • 0:12 - 0:15
    My configuration includes this custom prompt,
  • 0:15 - 0:19
    which shows my user name in purple and what directory I'm in in blue.
  • 0:19 - 0:22
    Having it more colorful like this just makes it stand out more from
  • 0:22 - 0:24
    the other commands.
  • 0:24 - 0:29
    Now, if I cd into a directory with a Git repository, I also have this in green,
  • 0:29 - 0:32
    which shows which commit I currently have checked out.
  • 0:32 - 0:35
    Right now, it's just showing the commit ID, but in lesson two,
  • 0:35 - 0:39
    you'll see how to give commits names and this will become more useful.
  • 0:39 - 0:43
    This prompt will also show a star if I've made any changes since committing.
  • 0:43 - 0:48
    So if I were to open up game.js and add another line, then you see a star here,
  • 0:48 - 0:51
    which indicates that I have changes that haven't been committed.
  • 0:51 - 0:55
    I'm just going to undo that, so now the star is gone.
  • 0:55 - 0:57
    I also have tab completion set up so
  • 0:57 - 1:01
    I can type just the first few characters of a Git command, for example, git l
  • 1:01 - 1:06
    and press Tab, and the rest of the command will be completed automatically.
  • 1:06 - 1:09
    There are also some situations where Git will open up a text editor.
  • 1:09 - 1:12
    For example, as you'll see in the next lesson, when you make a submit,
  • 1:12 - 1:15
    Git opens an editor for you to write a commit message.
  • 1:15 - 1:18
    You want to just set this editor to whatever you prefer to use.
Title:
Git Workspace - How to Use Git and GitHub
Description:

more » « less
Video Language:
English
Team:
Udacity
Project:
UD775 - How to Use Git and GitHub
Duration:
01:19
Udacity Robot edited English subtitles for 01-26 Git Workspace
Udacity Robot edited English subtitles for 01-26 Git Workspace
Cogi-Admin edited English subtitles for 01-26 Git Workspace

English subtitles

Revisions Compare revisions