Say I have:
Commit 5 < HEAD
Commit 4
Commit 3
Commit 2
Commit 1
I want to Push (Commit 5) to different repo WITHOUT commits 2,3,4. Is that possible?
The reason why I need it:
I have 2 projects:
- a starter project (Starter).
- a project currently working on (Project-1) built on top of the (Starter).
While working on my (Project-1) I might need to do some changes to the (Starter).
What I currently have is 2 remotes in (Project-1):
origin
pointing to the private (Project-1) repository.starter
pointing to the open sourced (Starter) repository.
Normally while working in (Project-1) I push all my commits to the origin master branch.
However, when I do changes to the (Starter) I commit them alone and I try to push that specific commit Commit 5
to the (Starter) repository. This is working fine! using the git push starter c78d92e32ec1a:master
.
But the problem is when I push Commit 5
it also push all the previous commits (2,3,4), which in my case are related to the (Project-1).
Is it logically possible to only push specific commit even if it's not the last one. Example merge Commit 4
with (Starter) repo.