GitHub tutorial 07: Clone repository смотреть онлайн
Now all the necessary tools are ready. They need to be applied on something. Something here is the GitHub repository.
Before we start, let's clarify a pair of terminology: Fork and clone. Both can get you a copy of GitHub repository. So what's the difference?
Fork a repository means to create a copy of repository on GitHub server side. The physical copy resides remotely. Usually the purpose of fork is to start a new project based on the code from the old repository, and create a separate community around it. The reality is that those who fork a project rarely, if ever, return back to the original repository, or in more Git professional term, create a pull request to contribute to the parent project.
On the other hand, clone a repository is to get a copy of repository to local machine. Its primary purpose is to make the change to the code, and contribute back to original repository. At this stage of the tutorial, we will only deal with clone a repository to our local computer.
After we have clarified the difference between fork and clone, you may have another question if you have used CVS or SVN before: why don't we call the process of cloning a repository like in old days as "checkout a repository into a sandbox"?
The short answer is: git clone is similar or an analogue to SVN checkout.
But maybe a long answer would make it more clear. Git clone will get you the whole repository. I mean everything, a full fledged repository, having its own commit history, revision history, etc. Practically, you can work offline with your local repository.
SVN checkout, on the other hand, will give you a working copy of the central repository, without all the commit history, revision history, etc. So you have to connect to central server when commit the code. In other words, SVN working copy is not the full repository.
Furthermore, Git checkout has different meaning. Checkout in Git could mean switching between branches in local repository, or creating a new branch, or restore files from other revision.
So you see, to avoid possible confusion, let's just say "clone" when talking about retrieving a GitHub repository to local machine.
That's enough for the definitions.
Let's clone a GitHub repository to local machine. First go to GitHub repository of your choice. Copy the HTTPS web URL by clicking the green button on the web page. Then come back to the local machine, run git clone command with the GitHub repository address we just copied.
Here is a quick demo of git clone command working in PowerShell Console:
- change to c:\temp directory. You can certainly go to any other directory
- type "git clone" then paste the GitHub repository address with Ctrl + V shortcut
- press Enter to execute the command
- since I am using a small demo repository, it takes several seconds to finish
Now we have a local GitHub repository. Change directory to this new folder. You may notice we have the Git status summary information at prompt, because we have installed and imported posh-git module. We are now at master branch. It is synchronized with remote repository.
Use "dir" or "ls" to take a look at the files in local repository. If it's a new repository, there is only one file: README.md.
To practice what you have learned, delete this local repository, and clone it again. When you are ready, please move on. In next lesson, we will start working on master branch, adding a file to staging area, committing to local repository, then pushing to remote repository.
Thanks for watching!
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «GitHub tutorial 07: Clone repository» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.