From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 18 Sep 2015 19:41:44 -0700 (PDT) From: Steve Prybylx To: voidlinux Message-Id: <7fb8b059-57a9-4863-8698-66469db84b93@googlegroups.com> In-Reply-To: References: Subject: Re: howto to sqash files only on remote repo ? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_1530_282657780.1442630504164" ------=_Part_1530_282657780.1442630504164 Content-Type: multipart/alternative; boundary="----=_Part_1531_304076306.1442630504164" ------=_Part_1531_304076306.1442630504164 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit I usually keep my master branch clean and only use it for pulling from upstream. > git pull upstream master When I want to, for example, contribute a new package, I will create a new branch from master. I usually name it after the package I'm creating. So, From my master branch: > git checkout -b newpkg If some time has passed since I've started, A day or two: > $ git pull --rebase upstream master When I think my package is ready for a pull request: > git commit -m "New package: newpkg-version git push -u origin newpkg If there are errors, fix them and then: > git commit --amend git push -f Anyways, this is my usual workflow. Hope this helps! 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_1531_304076306.1442630504164 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
I usually keep my master branch clean and only use it= for pulling from upstream.
git pull upst= ream master=C2=A0
=C2=A0When I want to, for example, contr= ibute a new package, I will create a new branch from master. I usually name= it after the package I'm creating. So, =C2=A0From my master branch:
git checkout -b newpkg
If = some time has passed since I've started, A day or two:
$ git pull --rebase upstream master
=C2= =A0When I think my package is ready for a pull request:
git commit -m "New package: newpkg-version
=
git push -u origin newpkg
If = there are errors, fix them and then:
git = commit --amend
git push -f

Anyways, this is my usual workflow. Hope this help= s!=C2=A0
=C2=A0

On Thursday, September 1= 7, 2015 at 3:21:28 AM UTC-4, Pierre Bourgin wrote:
Hello there,

I'm newbie wit= h 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 carefu= lly read the usefull doc of PullMoll about git :
https://github.com/vo= idlinux/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_1531_304076306.1442630504164-- ------=_Part_1530_282657780.1442630504164--