Can git say if there will be a relocation of the conflict without actually recalculating?

I would like to programmatically determine that there will be interruption conflicts with my function branches if I try to reinstall them. Is there a way I can get git to tell me this information without actually doing rebase?

Otherwise, what is the easiest way to determine if the reboot has finished before git rebase --abort?

My question is similar to the two that match, but for merge instead of rebase

+4
source share
5 answers

, git, rebase?

- "". , "":-)... , , , , rebase.

, , git rebase --abort?

git rebase () , , ( ), . script git rebase $args || git rebase --abort.

+6

, , rebase git rebase -aorting?

git rebase , , -

git rebase feature && echo "Success" || echo "fail" && git rebase --abort

, , , . , rebase , , - , , , , :

branch=$(git branch | grep '* .*' | sed s/..//); git checkout -b $branch-rebase > /dev/null ; git rebase test-2 > /dev/null && result="Success" || result="fail" ; git rebase --abort ; git checkout $branch ; git branch -D $branch-rebase ; echo $result

( - , ), reban, rebase, . , , .

+1

" " rebase HEAD (, ).

git rebase develop feature_X

git rebase develop `git rev-parse feature_x`

. :

1) . , , . ( , , .)

2) ( ), , , , gc . , .

, . , feature_X feature_Y develop, , "rebase featureX then rebase featureY" . , , , , , - , , .

, " " - " , ". , , , , .

+1

SVSchmidt , :

git rebase master && (echo "Success" && git reset --hard ORIG_HEAD) || (echo "Fail" && git rebase --abort)

, reset HEAD HEAD . reflog , .

, , . , - , , . .

+1
0

Source: https://habr.com/ru/post/1680899/


All Articles