push-cmt
) to be pushed and the SHA (rmt-head-sha
) of the HEAD
(rmt-head
) of the remote repository.push-cmt
to follow the rmt-head
. push-cmt-sha
) of the commit (push-cmt
) to be pushed.
This demo shows how to push only d0c2846
at line 2 to the remote repository.
The statement following #
is comment.
git log --oneline
d0c2846 (HEAD -> main) commit to be pushed #push-cmt
ff46af9 interference commit
04e4ff6 (origin/main, origin/HEAD) Make some adjustments #rmt-head, rmt-head-sha=04e4ff6
git rebase -i 04e4ff6
Successfully rebased and updated refs/heads/main.
git log --oneline
f2aaa65 (HEAD -> main) interference commit
85e4d6b commit to be pushed #push-cmt, push-cmt-sha=85e4d6b
04e4ff6 (origin/main, origin/HEAD) Make some adjustments #rmt-head
git push origin 85e4d6b:main
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 271 bytes | 271.00 KiB/s, done.
Total 3 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To github.com:siyuanl96/linux-jcd.git
04e4ff6..85e4d6b 85e4d6b -> main
git log --oneline
f2aaa65 (HEAD -> main) interference commit
85e4d6b (origin/main, origin/HEAD) commit to be pushed
04e4ff6 Make some adjustments
Before Rebase
After Rebase
Push 85e4d6b
After Push