From: Steve Prybylx <sa.pr...@gmail.com>
To: voidlinux <void...@googlegroups.com>
Subject: Re: howto to sqash files only on remote repo ?
Date: Fri, 18 Sep 2015 20:19:43 -0700 (PDT) [thread overview]
Message-ID: <c9221a12-b597-45d8-bf31-90cbcbac5720@googlegroups.com> (raw)
In-Reply-To: <c256bbd0-6fb4-443d-bbeb-5564822418d8@googlegroups.com>
[-- Attachment #1.1: Type: text/plain, Size: 1578 bytes --]
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
>
[-- Attachment #1.2: Type: text/html, Size: 3877 bytes --]
next prev parent reply other threads:[~2015-09-19 3:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 7:21 Pierre Bourgin
2015-09-19 0:29 ` Pierre Bourgin
2015-09-19 2:41 ` Steve Prybylx
2015-09-19 3:19 ` Steve Prybylx [this message]
2015-09-19 19:40 ` Stefan Mühlinghaus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9221a12-b597-45d8-bf31-90cbcbac5720@googlegroups.com \
--to="sa.pr..."@gmail.com \
--cc="void..."@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).