ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.49k stars 41 forks source link

[release.ngs] git push fails #634

Open ilyash-b opened 1 year ago

ilyash-b commented 1 year ago

$(git push) after $(git commit -am "Releasing version: ${version}") fails with

To github.com:ngs-lang/ngs.git
 ! [rejected]        master -> master (non-fast-forward)
error: failed to push some refs to 'github.com:ngs-lang/ngs.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Merging from remote master helps but it's a workaround, not a solution

ilyash-b commented 1 year ago

In local temp dir, master branch:

$ git log --no-merges origin/master ^master
commit 9ef4220222d3ba4c1546a4e67c9c552a76671f93
Author: Ilya Sher <34807039+ilyash-b@users.noreply.github.com>
Date:   Sat Mar 18 15:41:06 2023 +0400

    Releasing version: 0.2.15

commit bdfb2fd70162cd7183ac8d45c774a5718cb19b09 (tag: v0.2.14, Artturin/master)
Author: Ilya Sher <34807039+ilyash-b@users.noreply.github.com>
Date:   Sat Apr 16 15:51:11 2022 +0300

    Releasing version: 0.2.14
ilyash-b commented 1 year ago

Workaround. While browser was open:

git stash
git merge origin/master -s ours
git stash pop
git add version.h
git log --no-merges origin/master ^master