Git Magic. Multiplayer Git | Волшебство Git. Групповая работа в Git History of edits
(Latest: mifistor 2 years, 3 months ago)
§ | |
| == Групповая работа в Git == History of edits
(Latest: ChivPointDJ 2 years, 3 months ago)
§ | |
Initially I used Git on a private project where I was the sole developer. Amongst the commands related to Git's distributed nature, I needed only *pull* and *clone* so could I keep the same project in different places. | Изначально я использовал Git для работы над проектом, в котором я был единственным разработчиком. Из всех команд, связанных с распределенными свойствами Git, я использовать только *pull* и *clone* для хранения одного проекта в разных местах. History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
Later I wanted to publish my code with Git, and include changes from contributors. I had to learn how to manage projects with multiple developers from all over the world. Fortunately, this is Git's forte, and arguably its raison d'être. | Позже я решил опубликовать свой код в Git и принять изменения других участников. Мне пришлось научиться управлять проектами, над которыми работают группы разработчиков со всего мира. Так уж случилось, что эта особенность как раз служит преимуществом Git и, возможно, даже смыслом ее существования. History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
| | |
Every commit has an author name and email, which is shown by *git log*. By default, Git uses system settings to populate these fields. To set them explicitly, type: | Каждый коммит содержит имя автора и адрес электронной почты, которые отображаются по команде *git log*. По умолчанию Git использует системные настройки для заполнения этих полей. Чтобы установить их явно, введите: History of edits
(Latest: maxbin 2 years, 3 months ago)
§ | |
$ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com | $ git config --global user.name "John Doe" $ git config --global user.email johndoe@example.com History of edits
(Latest: mifistor 2 years, 3 months ago)
§ | |
Omit the global flag to set these options only for the current repository. | Чтобы установить эти параметры только для текущего репозитория, опустите флаг --global. History of edits
(Latest: lda 2 years, 2 months ago)
§ | |
=== Git Over SSH, HTTP === | === Git через SSH, HTTP === History of edits
(Latest: mifistor 2 years, 3 months ago)
§ | |
Suppose you have SSH access to a web server, but Git is not installed. Though less efficient than its native protocol, Git can communicate over HTTP. | Предположим, у вас есть SSH доступ к веб-серверу, но Git не установлен. Git может использовать менее эффективное (нежели его собственный протокол) http-соединение. History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
Download, compile and install Git in your account, and create a repository in your web directory: | Скачайте, скомпилируйте и установите Git в своем аккаунте, а затем создайте репозиторий в своей веб-директории: History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
$ GIT_DIR=proj.git git init | $ GIT_DIR=proj.git git init History of edits
(Latest: ChivPointDJ 2 years, 3 months ago)
§ | |
In the "proj.git" directory, run: | В директории "proj.git" выполните: History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
$ git --bare update-server-info $ cp hooks/post-update.sample hooks/post-update | $ git --bare update-server-info $ cp hooks/post-update.sample hooks/post-update History of edits
(Latest: mifistor 2 years, 3 months ago)
§ | |
For older versions of Git, the copy command fails and you should run: | В старых версиях Git команда копирования не работает, поэтому нужно запустить: History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
$ chmod a+x hooks/post-update | $ chmod a+x hooks/post-update History of edits
(Latest: mifistor 2 years, 3 months ago)
§ | |
Now you can publish your latest edits via SSH from any clone: | Теперь можно публиковать свои последние правки через SSH из любой копии: History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
$ git push web.server:/path/to/proj.git master | $ git push web.server:/path/to/proj.git master History of edits
(Latest: mifistor 2 years, 3 months ago)
§ | |
and anybody can get your project with: | после этого ваш проект станет доступен всем через HTTP: History of edits
(Latest: Natamile 2 years, 2 months ago)
§ | |
$ git clone http://web.server/proj.git | $ git clone http://web.server/proj.git History of edits
(Latest: ChivPointDJ 2 years, 3 months ago)
§ | |
=== Git Over Anything === | === Git через что угодно === History of edits
(Latest: ivan.borzenkov 2 years, 3 months ago)
§ | |
Want to synchronize repositories without servers, or even a network connection? Need to improvise during an emergency? We've seen <<makinghistory, *git fast-export* and *git fast-import* can convert repositories to a single file and back>>. We could shuttle such files back and forth to transport git repositories over any medium, but a more efficient tool is *git bundle*. | Хотите синхронизировать репозитории без серверов или даже без сетевого подключения? Необходимо импровизировать в чрезвычайной ситуации? Мы рассмотрели, как <<makinghistory, *git fast-export* и *git fast-import* могут преобразовать репозитории в один файл и обратно >>. Мы можем обмениваться такими файлами между репозиториями git с помощью любых носителей, но более эффективным инструментом является *git bundle*.
History of edits
(Latest: Fenrir 2 years, 3 months ago)
§ | |
The sender creates a 'bundle': | Отправитель создает пакет ('bundle'): History of edits
(Latest: ivan.borzenkov 2 years, 3 months ago)
§ | |
$ git bundle create somefile HEAD | $ git bundle create somefile HEAD History of edits
(Latest: ChivPointDJ 2 years, 3 months ago)
§ | |
— Скачать черновой вариант переведенных глав (PDF, 480 Кб): http://files.getdropbox.com/u/281916/... Если в книге Вам не понравился или был непонятен перевод, нашли ошибку, пожалуйста свяжитесь со мной: mifistor@gmail.com Или можете помочь имеется открытый репозиторий gitmagic-ru, где хранится вся работа: http://github.com/mifistor/gitmagic-ru — mifistor
Ссылка на черновой вариант: http://dl.getdropbox.com/u/281916/del... — mifistor