English feliratok

← Git Workspace - How to Use Git and GitHub

Beágyazókód kérése
5 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. Before you continue to the next lesson, I'd like to encourage you to
  2. take a minute to set up a Git workspace that will work well for you.
  3. If you take the time to configure a few things about Git,
  4. it can be much easier and more pleasant to use.
  5. My configuration includes this custom prompt,
  6. which shows my user name in purple and what directory I'm in in blue.
  7. Having it more colorful like this just makes it stand out more from
  8. the other commands.
  9. Now, if I cd into a directory with a Git repository, I also have this in green,
  10. which shows which commit I currently have checked out.
  11. Right now, it's just showing the commit ID, but in lesson two,
  12. you'll see how to give commits names and this will become more useful.
  13. This prompt will also show a star if I've made any changes since committing.
  14. So if I were to open up game.js and add another line, then you see a star here,
  15. which indicates that I have changes that haven't been committed.
  16. I'm just going to undo that, so now the star is gone.
  17. I also have tab completion set up so
  18. I can type just the first few characters of a Git command, for example, git l
  19. and press Tab, and the rest of the command will be completed automatically.
  20. There are also some situations where Git will open up a text editor.
  21. For example, as you'll see in the next lesson, when you make a submit,
  22. Git opens an editor for you to write a commit message.
  23. You want to just set this editor to whatever you prefer to use.