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

Kamil Domański kdomanski at kdemail.net
Mon Jan 3 22:31:17 GMT 2011


On Monday 03 January 2011 23:00:18 David Jarvie wrote:
> 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?

I'm by no means good at git, but this might help:

Find out the hash of the latest "official" commit in your repo. Let's say it's 
abc123.

$ git branch -m master mybranch
Should rename the master branch to mybranch.

$ git checkout abc123 -b master
Should create a new master branch, ending with the last official commit, 
therefore theoretically identical to untouched master.

Let me know if my guess was right.

Regards,
Kamil Domański
_______________________________________________
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