Skip to content

Instantly share code, notes, and snippets.

@bsa7
Last active April 12, 2019 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bsa7/b6379cdfe663134689345690530030c5 to your computer and use it in GitHub Desktop.
Save bsa7/b6379cdfe663134689345690530030c5 to your computer and use it in GitHub Desktop.
Educa - git basics

Мы на ветке master

git branch
=> 
* master

Создаём ветку, относящуюся к задаче:

git checkout -b EDW-1234-task_short_name
=>
Switched to a new branch 'EDW-1234-task_short_name'

Правила именования веток:

git push -f origin EDW-1234-task_short_name
^^^^^^^^ - команда 
         ^^ - ключ
            ^^^^^ - сервер
                   ^^^^^^^^^^^^^^^^^^^^^^^^ - Имя ветки
                   ^^^^^^^^^ - Номер задачи в Джире
                            ^^^^^^^^^^^^^^^ - Краткое описание задачи в Джире

Посмотрим, какие мы внесли изменения:

git status
=>
On branch EDW-1234-task_short_name
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   app/components/sequencer/ChooseCorrectFormQuestionComponent.jsx
        modified:   app/components/sequencer/SelectAnswerQuestionComponent.jsx
        modified:   app/lib/questionCheckersHelper.js
        modified:   app/lib/shapes.js
        modified:   app/pages/sequencer/SequencerPage.jsx

no changes added to commit (use "git add" and/or "git commit -a")

Добавим изменения в ветку:

git add .

Сохраним изменения в ветке:

git commit -m 'EDW-1234 Чуть более подробное описание сделанных изменений'
=>
[EDW-1234-task_short_name 1df3a101f] EDW-1234 Чуть более подробное описание сделанных изменений
 5 files changed, 465 insertions(+), 641 deletions(-)

Пушим ветку в репозиторий

git push -f origin EDW-1234-task_short_name
=>
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 14.33 KiB | 2.05 MiB/s, done.
Total 5 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 5 local objects.
To github.com:educagroup/educa-test.git
 + c655b546f...1df3a101f EDW-1234-task_short_name -> EDW-1234-task_short_name (forced update)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment