Placeholder Image

字幕列表 影片播放

  • If you already have Git installed, let's play around

  • with the configuration for your settings.

  • GitHub & Git Foundations

  • Config

  • FIrst, you need to make sure that you have your user.name

  • and user.email set.

  • Then you can tune the line endings and the color

  • to personalize the experience a bit more.

  • Lastly we need to make sure that we understand

  • different setting levels: do you want this across all your repositories,

  • or just the local one you're working on right now?

  • Config User Info

  • Having user.name and user.email set correctly

  • can be important for ownership of your work.

  • Do you want a recognition for some of the work you did?

  • You need to make sure that email and username

  • are set correctly.

  • Those values carry over into the credit that you get for your work,

  • and show up in the user interface of sites like github.com

  • when you post and import that content.

  • Config Line Endings & Color

  • Now beyond those two settings, you're certainly

  • going to want to care about line endings,

  • and you're also going to want to care about color.

  • Line endings is particularly important because we still have

  • a difference in platform: Mac, Linux, Windows, CR,

  • versus CRLF, LF, all these choices,

  • and Git will help normalize those files being checked

  • into the repository through settings like core.autocrlf.

  • Now color, I perceive, is one that's kind of more user-interface tweak.

  • Color is something that is very easily recognizable

  • without having to read an entire sentence, so if we had something that was in red,

  • we might know that that's still being worked on,

  • versus something that is green, meaning it's good to go.

  • Branches list in color, status lists in color,

  • log history lists in color, so just about every Git command

  • supplements with red, green, yellow and other colors

  • to indicate the state of that code,

  • that line, that branch, or that commit.

  • Config Useful Settings

  • Now these three settings that we've been speaking about,

  • there are several levels that we'd want to set them at.

  • One that feels system-wide, and maybe one

  • that's a little more narrow. Tell me a bit about those.

  • The more narrow one is the local setting.

  • That's the one that's gonna be closest to us

  • and take the most precedence. Above that is global,

  • which is slightly weaker and will be overwritten by local,

  • and at the weakest level is the system.

  • These are generally the most vague or less often used settings

  • because they will be overridden by global or local.

  • So what I tell my students is that it works

  • just like Object-Oriented inheritance. The level closest to the setting

  • is the one that wins. --local, in this case.

  • Thanks for watching

  • Thanks for watching Git Configuration.

  • Don't forget to subscribe to get GitHub Guides

  • and check out our other channels here.

  • I say, if you have questions or comments,

  • Git commit -m them in a message below.

  • We'll try to get that to a future video

  • that we record, or maybe training video things at the bottom...?

  • port.subscribe GitHub Guide...

If you already have Git installed, let's play around

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級

配置 - GitHub & Git Foundations (Config • GitHub & Git Foundations)

  • 36 5
    Mickey Fly 發佈於 2021 年 01 月 14 日
影片單字