Before you continue to the next lesson, I'd like to encourage you to
take a minute to set up a Git workspace that will work well for you.
If you take the time to configure a few things about Git,
it can be much easier and more pleasant to use.
My configuration includes this custom prompt,
which shows my user name in purple and what directory I'm in in blue.
Having it more colorful like this just makes it stand out more from
the other commands.
Now, if I cd into a directory with a Git repository, I also have this in green,
which shows which commit I currently have checked out.
Right now, it's just showing the commit ID, but in lesson two,
you'll see how to give commits names and this will become more useful.
This prompt will also show a star if I've made any changes since committing.
So if I were to open up game.js and add another line, then you see a star here,
which indicates that I have changes that haven't been committed.
I'm just going to undo that, so now the star is gone.
I also have tab completion set up so
I can type just the first few characters of a Git command, for example, git l
and press Tab, and the rest of the command will be completed automatically.
There are also some situations where Git will open up a text editor.
For example, as you'll see in the next lesson, when you make a submit,
Git opens an editor for you to write a commit message.
You want to just set this editor to whatever you prefer to use.
قبل أن تتابعوا إلى الدرس التالي، أود تشجيعكم على
.الانتظار لحظة لإعداد مساحة عمل Git التي ستساعدكم كثيرًا
،إذا خصصتم بعض الوقت لتكوين بعض الأشياء عن Git
.فسوف يكون استخدامه أكثر متعة وأيسر بكثير
ويشتمل التكوين الخاص بي على هذه المطالبة المخصصة
.التي تظهر اسم المستخدم الخاص بي باللون القرمزي ودليلي باللون الأرجواني
وعندما يكون ذلك أكثر ثراءًا بالألوان كما ترون، فإن هذا يجعله متفردًا عن
.الأوامر الأخرى
،والآن إذا أصدرت أمرًا في مستودع Git، فسوف أحصل على ذلك أيضًا باللون الأخضر
.الذي يبين التثبيت الذي راجعته في الوقت الراهن
،وهو يظهر الآن معرِّف التثبيت، ولكن في الدرس الثاني
.سترون طريقة إعطاء أسماء التثبيتات وسيصبح ذلك أكثر نفعًا
.ستظهر هذه المطالبة نجمة إذا أدخلت أية تغييرات بعد التثبيت
،ولذلك، فلو أني فتحت game.js وأضفت سطرًا آخر، حينها سترون نجمة هنا
.وهي تشير إلى أن لدي تغييرات لم يتم تثبيتها
.وها أنا أُلغي ذلك، فتختفي الآن النجمة
لدي أيضًا إعداد إكمال علامة التبويب، ولهذا
يمكنني كتابة حروف قليلة فقط من أي أمر Git، على سبيل المثال git l
.وأضغط على Tab فيكتمل بقية الأمر تلقائيًا
.هناك أيضًا بعض المواقف التي سيفتح فيها Git محرر نص
،فمثلاً، كما سترون في الدرس التالي، عندما تصدرون أمر submit
.سيفتح Git محرر نص لكم لكتابة رسالة تثبيت
.سيلزمكم فقط تعيين هذا المحرر على أي شيء تفضلون استخدامه
다음 강의로 넘어가기 전에
Git 의 작업 공간을 설정하는데
잠시 시간을 내서
해 보는것이 좋을 것 같습니다
Git 에 대해서
설정하는 시간을 갖고 나면
Git 을 사용하는 것이
더 쉽고 즐거울 것입니다
개인 설정에는
프롬프트도 포함되는데
저는 사용자 이름을 보라색으로
폴더 명을 파란색으로 설정했습니다
색을 입히는 것만으로도
다른 명령에 비해
눈에 띄게 됩니다
Git 의 저장소 폴더에 들어가면
현재 체크아웃한 커밋을
초록색으로 보여줍니다
지금은 그냥 커밋 ID가 보이지만
2장에 가면
커밋에 이름을 붙일 수 있고
이는 더 유용해집니다
프롬프트는 변경이 발생했을 때
커밋 전까지 * 기호를 보여줍니다
game.js 파일을 열고
내용을 추가하면 *가 생기는데
이는 아직 커밋 하지 않은
변경점이 있다는 것을 의미합니다
앞의 변경을 취소하면
* 가 다시 사라지네요
저는 탭 키 완성 설정을
해 놓았기 때문에 (Tab)
Git 명령어에서 앞의
몇 글자만 입력한 다음
탭 키를 누르면 명령어의 나머지가
자동으로 완성됩니다
Git 이 텍스트 편집기를
사용하는 경우도 있습니다
예를 들어, 다음 장에서 보게 될
제출을 하게 되면
Git 은 편집기를 열어
커밋 메시지를 입력하게 합니다
원하는 대로 사용하기 편하게
설정을 해 보세요
Antes de passar para a próxima lição, quero incentivá-lo a
configurar uma área de trabalho Git que funcione bem para você.
Se você configurar algumas coisas no Git,
ele ficará mais fácil e mais agradável de usar.
Minha configuração inclui este prompt personalizado,
que mostra meu nome de usuário em roxo e o diretório em que estou em azul.
Usar mais cores assim faz com que se destaquem dos
outros comandos.
Agora, se eu usar cd em um diretório com um repositório Git, também terei isso em verde,
o que mostra de qual commit fiz check-out.
No momento, mostra apenas a ID do commit, mas na lição dois,
você verá como dar nomes a commits e isso será mais útil.
Este prompt também mostrará um asterisco se eu tiver feito alterações desde confirmar.
Se eu fosse abrir game.js e adicionar outra linha, você veria um asterisco aqui,
indicando que fiz alterações que não foram confirmadas.
Vou desfazer isso para remover o asterisco.
Também tenho a conclusão de guia configurada
para poder digitar apenas os primeiros caracteres de um comando Git, por exemplo, git l,
pressionar Tab, e o resto do comando será preenchido automaticamente.
Também há algumas situações em que Git abrirá um editor de texto.
Por exemplo, como você pode ver na próxima lição, quando executa um submit,
o Git abre um editor para você escrever uma mensagem de commit.
Você só quer definir este editor de acordo com suas preferências.
在继续学习下一节课之前 建议你花一分钟时间设置好 Git 工作空间
使其能够满足你的使用习惯
如果你花时间对 Git 进行了一些配置
Git 将会更易于使用 也会让你用的更舒心
我的配置包括这个自定义提示
用紫色表示我的用户名 蓝色表示所在的目录
用各种颜色来标注可以使不同部分
从其他命令中凸显出来
如果我用 cd 命令进入具有 Git 版本库的目录中 我还用绿色来表示这部分
显示出当前我检出的是哪个 commit
现在只是显示出 commit ID 在第二节课中
你将学会如何为 commit 命名 这将会更有用
如果在 commit 后我进行了任何更改 该提示还会显示一个星号
如果我打开 game.js 添加了一行内容 就会在这里看见一个星号
表示我做出了尚未 commit 的更改
我将取消添加 现在星号消失了
我还设置了 Tab 自动填充功能
这样当我输入 Git 命令的前几个字符后 例如 git l
然后按下 Tab 该命令的剩余内容会自动填充
在某些情况下 Git 还会打开文本编辑器
例如 在下节课中你会看到 当你 commit 时
Git 会打开文本编辑器供你写 commit 消息
你可以将该编辑器设置为你想要使用的任何编辑器