From owner-freebsd-questions@freebsd.org Thu Apr 29 12:16:56 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B266F625ECE for ; Thu, 29 Apr 2021 12:16:56 +0000 (UTC) (envelope-from 4250.82.1d4d0000057e854.f4f2ca7525ecafbedd0d0decb8006b2f@email-od.com) Received: from s1-b0c6.socketlabs.email-od.com (s1-b0c6.socketlabs.email-od.com [142.0.176.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4FWDyH5Yqjz4cB6 for ; Thu, 29 Apr 2021 12:16:55 +0000 (UTC) (envelope-from 4250.82.1d4d0000057e854.f4f2ca7525ecafbedd0d0decb8006b2f@email-od.com) DKIM-Signature: v=1; a=rsa-sha256; d=email-od.com;i=@email-od.com;s=dkim; c=relaxed/relaxed; q=dns/txt; t=1619698616; x=1622290616; h=content-transfer-encoding:content-type:mime-version:references:in-reply-to:message-id:subject:cc:to:from:date:x-thread-info; bh=N8ALgmBiqVxcTVvt4Zs7+26CrJDNr0mPDJSqp3wtGeo=; b=NPLC8Odv05xblRMzkccq+5ill9jPr9OYYrliobdoERLTDdHmQhS81UQMhGcSEOEYzgLVCOtLbC++UQ2P/XJ0L/PY7Tm3VSW79bUivgtiA1L2RvNAUcSN7g1XJgzi2tjUZGJANxYmIvhMGFWIOhcphNW3zLvddCdUR82nLcsBsdg= X-Thread-Info: NDI1MC4xMi4xZDRkMDAwMDA1N2U4NTQuZnJlZWJzZC1xdWVzdGlvbnM9ZnJlZWJzZC5vcmc= Received: from r3.us-east-1.aws.in.socketlabs.com (r3.us-east-1.aws.in.socketlabs.com [142.0.191.3]) by mxsg2.email-od.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 29 Apr 2021 08:16:47 -0400 Received: from smtp.lan.sohara.org (EMTPY [185.202.17.215]) by r3.us-east-1.aws.in.socketlabs.com with ESMTP(version=Tls12 cipher=Aes256 bits=256); Thu, 29 Apr 2021 08:16:46 -0400 Received: from [192.168.63.1] (helo=steve.lan.sohara.org) by smtp.lan.sohara.org with smtp (Exim 4.94 (FreeBSD)) (envelope-from ) id 1lc5b4-000Pqz-5s; Thu, 29 Apr 2021 13:16:45 +0100 Date: Thu, 29 Apr 2021 13:16:45 +0100 From: Steve O'Hara-Smith To: Andrea Venturoli Cc: freebsd-questions@freebsd.org Subject: Re: Maintaining my own branch with git Message-Id: <20210429131645.818bf135a9c3ebd40c2d50fd@sohara.org> In-Reply-To: <0e56b430-aac9-ab43-8a3a-7787930fcc31@netfence.it> References: <20210428131629.b644748817de331dbe2edef6@sohara.org> <0e56b430-aac9-ab43-8a3a-7787930fcc31@netfence.it> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; amd64-portbld-freebsd12.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4FWDyH5Yqjz4cB6 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=email-od.com header.s=dkim header.b=NPLC8Odv; dmarc=none; spf=pass (mx1.freebsd.org: domain of 4250.82.1d4d0000057e854.f4f2ca7525ecafbedd0d0decb8006b2f@email-od.com designates 142.0.176.198 as permitted sender) smtp.mailfrom=4250.82.1d4d0000057e854.f4f2ca7525ecafbedd0d0decb8006b2f@email-od.com X-Spamd-Result: default: False [-2.70 / 15.00]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[email-od.com:s=dkim]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:142.0.176.0/20]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[sohara.org]; RBL_DBL_DONT_QUERY_IPS(0.00)[142.0.176.198:from]; SPAMHAUS_ZRD(0.00)[142.0.176.198:from:127.0.2.255]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[email-od.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; FORGED_SENDER(0.30)[steve@sohara.org,4250.82.1d4d0000057e854.f4f2ca7525ecafbedd0d0decb8006b2f@email-od.com]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:7381, ipnet:142.0.176.0/22, country:US]; FROM_NEQ_ENVFROM(0.00)[steve@sohara.org,4250.82.1d4d0000057e854.f4f2ca7525ecafbedd0d0decb8006b2f@email-od.com]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Apr 2021 12:16:56 -0000 On Thu, 29 Apr 2021 14:10:55 +0200 Andrea Venturoli wrote: > On 4/28/21 2:16 PM, Steve O'Hara-Smith wrote: > > > 6: Update myworkingbranch with: > > git rebase main > > NB: This will stash your changes, bring in the updates and then > > reapply your changes, requiring you to sort out any conflicts that come > > up. 7: After this rebase you will need to force push myworkingbranch to > > your server > > When I try this, I get: > > % git push > > To ssh://... > > ! [rejected] netfence_main -> netfence_main > > (non-fast-forward) error: failed to push some refs to 'ssh://...' > > hint: Updates were rejected because the tip of your current branch is > > behind hint: its remote counterpart. Integrate the remote changes (e.g. > > hint: 'git pull ...') before pushing again. > > hint: See the 'Note about fast-forwards' in 'git push --help' for > > details. > > Should I pull or push with "-f"? Yes you should. What is happening is that when you rebase against main you rewrite the history of your changes (they are based against a different commit to those on your server) so you have to use force to get the server to accept the rewrite of history. -- Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun The computer obeys and wins. | licences available see You lose and Bill collects. | http://www.sohara.org/