Я создал запрос на получение, который имеет коммиты, как показано ниже.Однако мне необходимо переместить ветку удаленного отслеживания Merge 'original / master' в коммит avsp .
вывод журнала git
commit eb4b301a88f02adccecdc09b82e4fc4a12656d34 (HEAD -> avsp, origin/avsp)
Author: Nikhil P <nikhilap@blah.com>
Date: Thu May 2 20:26:45 2019 -0700
Address some review comments
commit 0ba34d2145688c133152e7db1d8bf29f503ab34c
Merge: 5e7c1a31 beacedb0
Author: Nikhil P <nikhilap@blah.com>
Date: Thu May 2 00:32:02 2019 -0700
Merge remote-tracking branch 'original/master' into avsp
commit beacedb0b2b2e4ceb1b8b626b94f66ba592356a4
Author: Guy Harris <guy@alum.mit.edu>
Date: Wed May 1 00:23:08 2019 -0700
Remove the IPv6 payload length checks for checksumming.
If there isn't an IPv6 payload, there isn't any TCP or UDP packet, and
there's no TCP or UDP header to checksum, so there's no need for the
check (it's not there for IPv4).
Ожидаемый журнал git
commit eb4b301a88f02adccecdc09b82e4fc4a12656d34 (HEAD -> avsp, origin/avsp)
Author: Nikhil P <nikhilap@blah.com>
Date: Thu May 2 20:26:45 2019 -0700
Address some review comments
commit beacedb0b2b2e4ceb1b8b626b94f66ba592356a4
Author: Guy Harris <guy@alum.mit.edu>
Date: Wed May 1 00:23:08 2019 -0700
Remove the IPv6 payload length checks for checksumming.
If there isn't an IPv6 payload, there isn't any TCP or UDP packet, and
there's no TCP or UDP header to checksum, so there's no need for the
check (it's not there for IPv4).
Я пытался перебазировать и раздавить последний2 коммитов в 1, поэтому я попытался
git rebase -i HEAD ~ 2
Это привело к ~ 450 коммитам
1 pick 111e17e8 Don't use CMAKE_C_STANDARD, it doesn't work on all versions of CMake.
2 pick 32f8eded Initialize C_ADDITIONAL_FLAGS where we start setting it.
** Snipped 400 more commits here **
451 pick beacedb0 Remove the IPv6 payload length checks for checksumming.
452 pick eb4b301a Address some review comments
Теперь, когдапопробуйте выбрать eb4b301a коммит и раздавить остальные, я вижу эту ошибку ниже:
error: cannot 'squash' without a previous commit
You can fix this with 'git rebase --edit-todo' and then run 'git rebase --continue'.
Or you can abort the rebase with 'git rebase --abort'.
Если невозможно выполнить перебазирование, возможно ли просто удалить коммит изсовершать историю?Будет ли побочный эффект из-за этого?