On Mon, 31 Jan 2011 21:25:31 +0100
Karel Vervaeke <ka...@vervaeke.info> wrote:

(Formatting sanitized.)

> >> I have a repository with commits
> >> A B C D E
> >> and a remote repository with commits
> >> A B C previously pushed and merged.
> >>
> >> Now I want to push D to the remote, but not E.
> >>
> >> I can see various possible ways this might work, but I can't afford
> >> to get it wrong, so I'd be grateful for a nudge in the right
> >> direction.
> >
> > $ git push REMOTE D:REMOTE_BRANCH
> >
> > where
> > REMOTE is the name of the remote repository,
> > D is SHA-1 (or another name) of the specific commit you want to
> > push, REMOTE_BRANCH is the branch you want to update.
[...]
> Another approach would be to create another local branch containing
> only A B C D and then pushing that branch.
Strictly speaking that approach would not be different as the whole
reason for such a branch to exist in this case would be to use its name
in the git-push invocation; I referred to this using the "or another
name" phrase.
A tag would do as well, as E^ would, and so on according to the
"gitrevisions" manual page.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to