From: Chris Packham <judge.packham@gmail.com>
To: "J. Bakshi" <joydeep@infoservices.in>
Cc: git@vger.kernel.org
Subject: Re: How to push the very last modification only ?
Date: Mon, 18 Jul 2011 20:58:51 +1200 [thread overview]
Message-ID: <4E23F5CB.3090009@gmail.com> (raw)
In-Reply-To: <20110718131730.4898ddaf@shiva.selfip.org>
Hi,
On 18/07/11 19:47, J. Bakshi wrote:
> Hello list,
>
> I have found that during push, all local commit goes into the git
> server.
Yes that's the normal behaviour. When you think about what push is doing
it's trying to make the remote branch the same as your local branch.
> Where I like to only push the very last modification with
> a meaningful comment which will be available at the git server. How
> can I then push only the last modified one ?
This is easily doable. What you need to do is prepare a branch that you
do want to push. Something like this, assuming that your current branch
is 'master' and you want to push to origin/master:
# first create temporary a branch to use while you're delivering
git checkout -b delivery origin/master
# now cherry pick the commits you do want to push. I usually use
# gitk and cherry-pick from the right-click menu, but for simplicity
# I'll use git cherry-pick here.
git cherry-pick master
# you can provide a commit id instead of 'master'.
# at this point you could also use git commit --amend to add any
# final tweaks to the commit
# check that your delivery branch is good using git log/gitk. Build,
# test, etc
# now push it to your local delivery branch to the remote master
# branch
git push origin delivery:master
# now do some cleanup
git checkout master
git branch -d delivery
git rebase origin/master
next prev parent reply other threads:[~2011-07-18 8:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 7:47 How to push the very last modification only ? J. Bakshi
2011-07-18 8:58 ` Chris Packham [this message]
2011-07-18 16:49 ` Drew Northup
2011-07-19 6:07 ` J. Bakshi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E23F5CB.3090009@gmail.com \
--to=judge.packham@gmail.com \
--cc=git@vger.kernel.org \
--cc=joydeep@infoservices.in \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).