Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
H How-To
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • docs
  • How-To
  • Wiki
  • initial config

initial config · Changes

Page history
Update initial config authored Oct 04, 2017 by Николай Кальгин's avatar Николай Кальгин
Show whitespace changes
Inline Side-by-side
Showing with 14 additions and 14 deletions
+14 -14
  • initial-config.markdown initial-config.markdown +14 -14
  • No files found.
initial-config.markdown
View page @ 646b083c
# Начальная настройка # Установка Git в Windows
1. Установка [менеджера пакетов Chocolatey](https://chocolatey.org/) 1. Установка менеджера пакетов [Chocolatey](https://chocolatey.org/)
В стандартной коммандной строке Windows, запущенной с правами администратора, выполнить: В стандартной коммандной строке Windows, запущенной с правами администратора, выполнить:
```bash ```bash
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
``` ```
2. Установить git-клиент, в Window PowerShell с правами администратора выполнить: 2. Установить Git-клиент, в PowerShell с правами администратора выполнить:
```bash ```bash
choco install -y git tortoisegit choco install -y git tortoisegit
``` ```
3. Имя, которое будет указано в коммитах: # Начальная настройка
1. Имя, которое будет указано в коммитах:
```bash ```bash
git config --global user.name <Gitlab profile Username> git config --global user.name <Gitlab profile Username>
``` ```
4. E-mail, который будет указан в профиле коммита: 1. E-mail, который будет указан в профиле коммита:
```bash ```bash
git config --global user.email <Gitlab profile Email> git config --global user.email <Gitlab profile Email>
``` ```
5. Автоматическая конвертация символов конца строк. 1. Автоматическая конвертация символов конца строк.
Для пользователей Windows: Для пользователей Windows:
```bash ```bash
git config --global core.autocrlf true git config --global core.autocrlf true
...@@ -32,12 +33,12 @@ git config --global user.email <Gitlab profile Email> ...@@ -32,12 +33,12 @@ git config --global user.email <Gitlab profile Email>
git config --global core.autocrlf true git config --global core.autocrlf true
``` ```
6. Путь к глобальному gitignore-файлу (Windows), файл [.gitignore_global](https://source.isimplelab.com/publics/howto/blob/89f4b0b57daa4e31e8f3e87872f170df3d973251/.gitignore_global) можно скачать в этом же репозитории: 1. Путь к глобальному gitignore-файлу, файл [.gitignore_global](https://source.isimplelab.com/publics/howto/blob/89f4b0b57daa4e31e8f3e87872f170df3d973251/.gitignore_global) можно скачать в этом же репозитории:
```bash ```bash
git config --global core.excludesfile %USERPROFILE%\.gitignore_global git config --global core.excludesfile %USERHOME%\\.gitignore_global
``` ```
7. Добавляем короткие псевдонимы для часто встречающихся команд: 1. Добавляем короткие псевдонимы для часто встречающихся команд:
```bash ```bash
git config --global alias.co checkout git config --global alias.co checkout
git config --global alias.br branch git config --global alias.br branch
...@@ -48,20 +49,19 @@ git config --global alias.up "submodule update --init --remote" ...@@ -48,20 +49,19 @@ git config --global alias.up "submodule update --init --remote"
git config --global alias.each "submodule foreach" git config --global alias.each "submodule foreach"
``` ```
8. Автоматический rebase вместо merge после pull 1. Автоматический rebase вместо merge после pull
```bash ```bash
git config --global branch.autosetuprebase always git config --global branch.autosetuprebase always
git config --global branch.master.rebase true git config --global branch.master.rebase true
``` ```
9. Публикуем изменения только из текущей отслеживаемой ветки при вызове git push без аргументов 1. Публикуем изменения только из текущей отслеживаемой ветки при вызове git push без аргументов
```bash ```bash
git config --global push.default tracking git config --global push.default tracking
``` ```
10. Активируем запись действий по разрешению конфликтных ситуаций при слиянии 1. Активируем запись действий по разрешению конфликтных ситуаций при слиянии
```bash ```bash
git config --global rerere.enabled true git config --global rerere.enabled true
git config --global rerere.autoupdate true git config --global rerere.autoupdate true
``` ```
Clone repository
  • Work in branches
  • clone ibank
  • create new module
  • create ssh key
  • git essentials
  • initial config
  • remove module
  • submodule basic