Why Rebase Add Other's Commit To My Pr In GitHub?

Asked 2 years ago
Answer 3
Viewed 4837
0


I think I understand what is going on.

So.... first, you push the branch after adding a single commit, right? And you set it as the upstream. So, you have this:

XXXX test message (HEAD -> test-rebase, origin/test-rebase)
ed40e2c whatever commit on that commit

* XXXX' test message (HEAD-> test-rebase)
* fa9a315 blahblah (main)* e52240c blahblah* 25c40fb blahblah* 9ceb4b0 blahblah| * XXXX  test message (origin/test-rebase)|/* ed40e2c blahblah

Read Also : How do I remove a property from a JavaScript object?
Answered 2 years ago Naveen OjhaNaveen Ojha

These are commands to reproduce my problem, but I'm not sure for others.


>>> (main) git log --oneline --graph -5
* fa9a315 * e52240c* 25c40fb* 9ceb4b0* ed40e2c>>> (main) git checkout ed40e2c>>> (@ed40e2c) git switch -c test-rebase>>> (test-rebase) echo "foo" >> ./test.txt>>> (test-rebase) git commit -am "test message">>> (test-rebase) git push -u origin test-rebase>>> (test-rebase) git branch -vv | grep test-rebase* test-rebase  6c0f33e [origin/test-rebase] test message>>> (test-rebase) // create a pr in GitHub>>> (test-rebase) git rebase main>>> (test-rebase ⇣1⇡5) git pull -r>>> (test-rebase ⇡4) git push>>> (test-rebase) // now my pr has other's commits, and I'm also the coauthor of those commits>>> (test-rebase) git log --oneline --graph test-rebase origin/test-rebase main origin/main* 8bd227f (HEAD -> test-rebase, origin/test-rebase) message-4* 938935c message-3* 4080d9d message-2* 8dbd5cd message-1* 6c0f33e test message| * fa9a315 (origin/main, origin/HEAD, main) message-4| * e52240c message-3| * 25c40fb message-2| * 9ceb4b0 message-1|/  * ed40e2c

Answered 2 years ago Naveen OjhaNaveen Ojha
0

body   overflow-y: hidden; : hidden; /* Hide horizontal scrollbar */
}

Answered 2 years ago Naveen OjhaNaveen Ojha