git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: How to push the very last modification only ?

From
Drew Northup <drew.northup@maine.edu>
Date
Jul 18, 2011, 16:49 UTC
Message-ID
<1311007753.18654.32.camel@drew-northup.unet.maine.edu>
In-Reply-To
<4E23F5CB.3090009@gmail.com>
On Mon, 2011-07-18 at 20:58 +1200, Chris Packham wrote:
Show 18 quoted lines
> 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:
<snip>

Another way to do what Chris describes is to use Interactive Rebase (git rebase -i) to squash commits together. Please read the manual page for that carefully before using it on a production repository.

-- 
-Drew Northup
________________________________________________
"As opposed to vegetable or mineral error?"
-John Pescatore, SANS NewsBites Vol. 12 Num. 59
Previous: Chris PackhamNext: J. Bakshi
Message 3 of 4 in “How to push the very last modification only ?”
  1. J. BakshiJul 18, 2011
  2. Chris PackhamJul 18, 2011
  3. Drew NorthupJul 18, 2011
  4. J. BakshiJul 19, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.