[Kde-pim] Re: Pushing a single commit in git

David Jarvie djarvie at kde.org
Mon Jan 3 22:00:18 GMT 2011


On Monday 03 January 2011 21:40:24 Christian Mollekopf wrote:
> On Monday 03 January 2011 22:07:05 Torgny Nyblom wrote:
> > On Monday 03 January 2011 20.47.09 David Jarvie wrote:
> > > How can I push a commit for one specific file to the git repository? I've
> > > committed various changes locally, but I currently only want to push one
> > > of them to the kdepim repository. I've looked at git help and several
> > > cheat sheets etc, but can't find how to do it.
> > 
> > As far as i know you cannot :( One reason to use local branches, something
> > I always remember after the fact that needed one :)
> just make "git stash" which will save all your uncommited changes, and reset 
> all files to the latest commit. You can then commit.
> 
> Afterwards reapply your changes with "git stash apply"

I've alread committed various changes, including the single one I want to push. Is there any way to create a new branch without any of my local commits, so that I can then apply the change to the single file in the local repository, and then push the change for that file only? Or would I have to download the whole repository again before making that change?

-- 
David Jarvie.
KDE developer.
KAlarm author -- http://www.astrojar.org.uk/kalarm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110103/78266dab/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list