Pull error

Коли гілки розходяться отримуємо наступне:

git pull origin test
From github.com:ukrmeteo/meteo-equip-src
 * branch            test       -> FETCH_HEAD
hint: You have divergent branches and need to specify how to reconcile them.
hint: You can do so by running one of the following commands sometime before
hint: your next pull:
hint: 
hint:   git config pull.rebase false  # merge (the default strategy)
hint:   git config pull.rebase true   # rebase
hint:   git config pull.ff only       # fast-forward only
hint: 
hint: You can replace "git config" with "git config --global" to set a default
hint: preference for all repositories. You can also pass --rebase, --no-rebase,
hint: or --ff-only on the command line to override the configured default per
hint: invocation.
fatal: Need to specify how to reconcile divergent branches.

Гіт каже, що історія гілок розійшлася і потрібно явно вказати, яким методом зливати різні гілки під час pull. Зазвичай прийнято використовувати метод merge, тому ми або щоразу це уточнюємо:

git pull --no-rebase origin test
From github.com:ukrmeteo/meteo-equip-src
 * branch            test       -> FETCH_HEAD
Merge made by the 'ort' strategy.
 public_html/_data/stations.json       | 2 +-
 public_html/calibr/calibr_cert_139.py | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

або зберігаємо глобальний параметр для всіх ваших репозиторіїв:

git config --global pull.rebase false

Last updated