From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 18 Sep 2015 20:19:43 -0700 (PDT) From: Steve Prybylx To: voidlinux Message-Id: In-Reply-To: References: Subject: Re: howto to sqash files only on remote repo ? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1609_1771110674.1442632783398" ------=_Part_1609_1771110674.1442632783398 Content-Type: multipart/alternative; boundary="----=_Part_1610_1409217935.1442632783404" ------=_Part_1610_1409217935.1442632783404 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I forgot an important step in there: > git add srcpkgs/newpkg/ before the > git commit -m "New package: newpkg-version" If your a complete newbie at git and your just making minor changes for a new package, I would probably suggest just using: > git commit --amend After each change. But, to answer your question about "squashing" some commits, You may want to try: > git log To find the hash of the "New package: newpkg" commit. We'll say it's '1234567...' (usually you just need the first 7 characters) > git reset 1234567 That will reset 'HEAD', Then: > git add srcpkgs/newpkg/ git commit --amend On Thursday, September 17, 2015 at 3:21:28 AM UTC-4, Pierre Bourgin wrote: > > Hello there, > > I'm newbie with git. > I try to pull requests to void-packages (offer new packages) in a nice way > for the rewiever, ie with only one changeset. > > So I carefully read the usefull doc of PullMoll about git : > > https://github.com/voidlinux/documentation/wiki/How-to-use-git,-by-@pullmoll > > My question: Is there a chance to keep the distinct commits (several) in > my local repo, but combine them into a single changeset in my remote github > repo ("origin") ? > > I used "git rebase -i" on my local repo (squash) then push to remote. > So remote repo will contains a single changeset as expected ... > And there is only ONE changeset too in my local repo, since the "rebase" > happens on my local repo first. > > I've read various doc, but did not find anyhting like "git push --rebase" > for instance. > > Any clue ? > > Thanks - Pierre > ------=_Part_1610_1409217935.1442632783404 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
I forgot an important step in there:
git add srcpkgs/newpkg/
before the=C2=A0
=
git commit -m "New package: newpkg-versio= n"

If your a complete newbie at git an= d your just making minor changes for a new package, I would probably sugges= t just using:
git commit --amend=C2=A0
=C2=A0After each change.=C2=A0

But,= to answer your question about "squashing" some commits, You may = want to try:
git log
=C2= =A0
To find the hash of the "New package: newpkg" commi= t. We'll say it's '1234567...' (usually you just need the f= irst 7 characters)
git reset 1234567
=C2=A0
That will reset 'HEAD', Then:
git add srcpkgs/newpkg/
git commit --amend=C2=A0
=C2=A0

= On Thursday, September 17, 2015 at 3:21:28 AM UTC-4, Pierre Bourgin wrote:<= blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;bord= er-left: 1px #ccc solid;padding-left: 1ex;">
Hello there,
I'm newbie with git.
I try to pull requests to void-packages = (offer new packages) in a nice way for the rewiever, ie with only one chang= eset.

So I carefully read the usefull doc of PullMoll about git :https://github.com/voidlinux/documentation/wiki/How-to-use-g= it,-by-@pullmoll

My question: Is there a chance to keep the dist= inct commits (several) in my local repo, but combine them into a single cha= ngeset in my remote github repo ("origin") ?

I used "= git rebase -i" on my local repo (squash) then push to remote.
So re= mote repo will contains a single changeset as expected ...
And there is = only ONE changeset too in my local repo, since the "rebase" happe= ns on my local repo first.

I've read various doc, but did not fi= nd anyhting like "git push --rebase" for instance.

Any clu= e ?

Thanks - Pierre
------=_Part_1610_1409217935.1442632783404-- ------=_Part_1609_1771110674.1442632783398--