public inbox for gentoo-proxy-maint@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-proxy-maint] local branch gone
       [not found] <1959854123.3123203.1544601371408.ref@mail.yahoo.com>
@ 2018-12-12  7:56 ` Vieri
  2018-12-12 11:34 ` Corentin “Nado” Pazdera
  1 sibling, 0 replies; 4+ messages in thread
From: Vieri @ 2018-12-12  7:56 UTC (permalink / raw
  To: gentoo-proxy-maint

Hi,

I'm new to git so please be kind. :-)

This is what I do when I contribute for CATEGORY/PACKAGE to github:

$ git checkout -b CATEGORY/PACKAGE master
$ repoman manifest 
$ git add file1 file2 file3...
$ repoman -dx full 
$ repoman -dx commit 
$ git push --no-signed github CATEGORY/PACKAGE 

That seems to work as expected.
However, suppose CATEGORY/PACKAGE does not exist in the master repository (gentoo/gentoo at github). So it's a NEW package contrib.
Also suppose that I don't want to wait for gentoo dev feedback on this particular contrib, and I want to move on and contribute another package.
So I won't be issuing this just yet:

$ git branch -d CATEGORY/PACKAGE


Instead, I will try to resync/update the main tree just in case there are some changes, and then fork a new branch.
So this is what I do:

$ git pull gentoo master 
$ git checkout -b CATEGORY/ANOTHER_PACKAGE master 

So I'm guessing that "git pull gentoo master" is the culprit as it might erase my CATEGORY/PACKAGE directory.

How can I avoid this?
What's the best practice?

Thanks

Vieri


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-proxy-maint] local branch gone
       [not found] <1959854123.3123203.1544601371408.ref@mail.yahoo.com>
  2018-12-12  7:56 ` [gentoo-proxy-maint] local branch gone Vieri
@ 2018-12-12 11:34 ` Corentin “Nado” Pazdera
  2018-12-12 14:11   ` Vieri
  1 sibling, 1 reply; 4+ messages in thread
From: Corentin “Nado” Pazdera @ 2018-12-12 11:34 UTC (permalink / raw
  To: gentoo-proxy-maint

December 12, 2018 8:56 AM, "Vieri" <rentorbuy@yahoo.com> wrote:

> Hi,
> 
> I'm new to git so please be kind. :-)
> 
> This is what I do when I contribute for CATEGORY/PACKAGE to github:
> 
> $ git checkout -b CATEGORY/PACKAGE master
> $ repoman manifest 
> $ git add file1 file2 file3...
> $ repoman -dx full 
> $ repoman -dx commit 
> $ git push --no-signed github CATEGORY/PACKAGE
Why --no-signed?

> That seems to work as expected.
> However, suppose CATEGORY/PACKAGE does not exist in the master repository (gentoo/gentoo at
> github). So it's a NEW package contrib.
> Also suppose that I don't want to wait for gentoo dev feedback on this particular contrib, and I
> want to move on and contribute another package.
> So I won't be issuing this just yet:
> 
> $ git branch -d CATEGORY/PACKAGE
> 
> Instead, I will try to resync/update the main tree just in case there are some changes, and then
> fork a new branch.
> So this is what I do:
> 
> $ git pull gentoo master 
> $ git checkout -b CATEGORY/ANOTHER_PACKAGE master 
> 
> So I'm guessing that "git pull gentoo master" is the culprit as it might erase my CATEGORY/PACKAGE
> directory.
> 
> How can I avoid this?
> What's the best practice?

I think you're looking for git rebase, there are tons of examples so I'll leave that to you, and simply put, that allows you to mess with history, which is useful to resync your work on top of the master branch.
git pull --rebase specifically helps for that last case.

Corentin “Nado” Pazdera


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-proxy-maint] local branch gone
  2018-12-12 11:34 ` Corentin “Nado” Pazdera
@ 2018-12-12 14:11   ` Vieri
  2018-12-12 15:53     ` Vieri
  0 siblings, 1 reply; 4+ messages in thread
From: Vieri @ 2018-12-12 14:11 UTC (permalink / raw
  To: gentoo-proxy-maint, Corentin “Nado” Pazdera

 
On Wednesday, December 12, 2018, 12:33:48 PM GMT+1, Corentin “Nado” Pazdera <nado@troglodyte.be> wrote: 
>
>> $ git checkout -b CATEGORY/PACKAGE master
>> $ repoman manifest 
>> $ git add file1 file2 file3...
>> $ repoman -dx full 
>> $ repoman -dx commit 
>> $ git push --no-signed github CATEGORY/PACKAGE
> Why --no-signed?

Otherwise I get: "fatal: the receiving end does not support --signed push"

> I think you're looking for git rebase, there are tons of examples so I'll leave that to you, and simply put, that allows you to mess with history, which is useful to resync your work on top of the master branch.
> git pull --rebase specifically helps for that last case.

I forgot to mention that I previously set:

$ git config --local pull.ff only 
$ git config --local pull.rebase preserve 
$ git config --local push.default simple 

Isn't "pull.rebase preserve" enough?


Vieri



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [gentoo-proxy-maint] local branch gone
  2018-12-12 14:11   ` Vieri
@ 2018-12-12 15:53     ` Vieri
  0 siblings, 0 replies; 4+ messages in thread
From: Vieri @ 2018-12-12 15:53 UTC (permalink / raw
  To: gentoo-proxy-maint

 I now have this:

$ git pull --rebase gentoo master
remote: Enumerating objects: 1358, done.
remote: Counting objects: 100% (1358/1358), done.
remote: Compressing objects: 100% (90/90), done.
remote: Total 1816 (delta 1268), reused 1358 (delta 1268), pack-reused 458
Receiving objects: 100% (1816/1816), 674.35 KiB | 1.74 MiB/s, done.
Resolving deltas: 100% (1297/1297), completed with 491 local objects.
From https://github.com/gentoo/gentoo
 * branch                    master     -> FETCH_HEAD  
 775c75ac491..1eb533aad99  master     -> gentoo/master
First, rewinding head to replay your work on top of it...
Applying: CATEGORY/PACKAGE: new ebuild / new package
error: gpg failed to sign the data
fatal: failed to write commit object

Seems good, except for that ugly fatal message. Should I worry about it?

Note that both gpg --version and gpg2 --version show the same version number (2.2.10).

Of course I defined:

$ git config --local user.signingkey 0xLONG-GPG-KEY 
$ git config --local commit.gpgsign 1 
$ git config --local push.gpgsign 1 

I can see the key in .git/config, as well as with:

$ gpg --list-secret-keys --keyid-format LONG

Thanks,

Vieri


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-12 15:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1959854123.3123203.1544601371408.ref@mail.yahoo.com>
2018-12-12  7:56 ` [gentoo-proxy-maint] local branch gone Vieri
2018-12-12 11:34 ` Corentin “Nado” Pazdera
2018-12-12 14:11   ` Vieri
2018-12-12 15:53     ` Vieri

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox