Article View: linux.kernel.git
Article #4321Feature request: remote aliases
From: demerphq
Date: Fri, 04 Dec 2026 12:06
Date: Fri, 04 Dec 2026 12:06
64 lines
13372 bytes
13372 bytes
Hi all, Thank you for your excellent work. I have a feature request, although I admit this might be enough of an edge case that it isn't worth adding support for. I seem to semi-regularly end up renaming my remotes for one reason or another, and then getting stung by muscle memory, existing scripts, or configuration that still refer to the old remote name. I think this could be avoided if Git supported aliases for remote names. For instance, one recurring pattern for me is moving from working with a single repository to a fork-based workflow. I start with one remote, "origin", but after creating a fork on GitHub I rename my remotes to "mine" and "theirs". Unfortunately, my fingers still think in terms of "origin", or I overlook a script that still uses that name somewhere. (I am simplifying here, I am aware I could make other choices for this exact case, this is just meant to illustrate the point.) I'd like to be able to explicitly decide which remote the old name should resolve to, perhaps with a command like: git remote alias origin mine Such that: git fetch origin git push origin main would behave as though I had typed: git fetch mine git push mine main Importantly, I don't want two independently configured remotes with separate remote-tracking branches. I want a single remote with a canonical name and one or more aliases for that name. Ideally, this would also work when referring to remote-tracking branches, such that "origin/main" would resolve to "mine/main" without requiring duplicate refs. Git could optionally issue a diagnostic when an alias is used, perhaps with a configuration option to suppress it. I searched the mailing list archives but couldn't find a previous discussion of this feature. I did, however, find someone independently requesting essentially the same functionality here: https://stackoverflow.com/questions/75151686/is-it-possible-to-make-an-alias-for-a-git-remote-name Is this something that would be considered a reasonable addition to Git? Or is there an existing mechanism for achieving this end result that I've overlooked? Thank you for considering this, cheers, Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"
Technical Details
Message-ID:
<CANgJU+UMaCbAYPgj2uHOZu84w+nWHoXgjOa4_-UNfRWErSc8Wg@mail.gmail.com>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76988-linux-kernel-git=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!git+bounces-76988-linux-kernel-git=dewy.ru
From: demerphq@gmail.com (demerphq)
Newsgroups: linux.kernel.git
Subject: Feature request: remote aliases
Date: Fri, 4 Dec 2026 13:06:28 +0100
Organization: Usenet Network
Message-ID: <CANgJU+UMaCbAYPgj2uHOZu84w+nWHoXgjOa4_-UNfRWErSc8Wg@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Injection-Info: usenet.network;
logging-data="2758756"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:8rMuv4euxrJUDL2+VpQPvZ4WotM= sha256:Oq4ceCtKonZ6mXx+Icd4jjmxoBUZ01XKfbCfEbcu6Ok=
sha1:J9IHH4Muf0xcDJX2wjO42E7n884= sha256:T5D9u6yY2mUYYLoYFikrKagXdvaMVX7LMGK9WR+cEz0=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 817BA117BE3; Fri, 4 Dec 2026 15:06:55 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.196
X-Spam-Status: No, score=-2.196 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id cuiXq_lhDEku;
Fri, 4 Dec 2026 15:06:52 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-76988-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 578C3117BD7; Fri, 4 Dec 2026 15:06:44 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id B345C3FB67; Fri, 4 Dec 2026 12:06:42 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796386002;
b=N2f4BsL2ajyUBsNaiJlaXlVBLR9jN/Vy2breE69ljDBGjSG3Bkq9X/SshKcOUHqN6TST
6x415pvy3SeRhfScLuYeERJbG1Cm+2H90ivTAFSWGqBcYiAG7L6HUm5nS51Nl52ok714i
BXRSECpv0/ywjp/NtbpGt5wpeeK/VmHs3CKSnXAkXyp0wqgSz0n+g0LQ/fhKn5O0MVBsk
ZVY4bgUK+WzeChSwe1WWusA5U+DsSsI8CFv6oS+0hQYltntWODc1iYgJSauJ/hLe8BsJS
1AKPjxzSpkx6x5GH90Oo3UKIZm1NNZXRmgKCJ+fZ4KFkfeVM2TKikl1O0L8oijmPQXA==
X-ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796386002;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:From:Date:
X-Gm-Features:Message-ID:Subject:To:Content-Type;
bh=tX3q1/opPqPRy82V1naQvnhFtm6CZtrGyfYnBm8bOrM=;
b=kutO/o6WR2p17sXnE9RKeRNRD8Yyf81PeziJNkBjPg/1HfEbzK8AxF9wkxRkwy2S/9G/
XSRJR+cbL3pVr0zfgl1uCmK+LXjEWBFmnRR36uv53uHUdkKaq7+wElR3CJba99XyddW7O
yeXPvT8jLmKO5Gm2lc5fSN7LXPOW7KotYcSwpQhRu13s0oZ3M5ZayDmxK4IJ4k+jwgcD2
F93B/A9dDtz2KLDKsXix2TESnKTviQSaNMA+wAekkd/kUT1A5HyokfJLfaSLskxdGiX2w
lLl9icF3Lj50yid8UHI4MDUYc53KZcGQ01kQ3Wgop4toE/yIErBKmZovx8tatgzD0+w==
X-ARC-Authentication-Results: i=3; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=egi97j5S;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C720606A335;
Fri, 4 Dec 2026 12:06:42 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=egi97j5S
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.217.53
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796386001;
b=rqi7MnECf51cA4SP+TqI11J42nq5I82D/6S5FA66XF/dRcKoM6PMs+QY2aistoIkibyo
Qf8OEn5wG8veAbbiiISxx2I0zY+OaH9WqmNQ1BdBe/DGyyRajId6NsRFZJ8gPJvq9nw+t
azShmqzj8YuKgBy+9R3cdM9oAxDsoAPl1nTz1/j4ZHGjJkjcrcKk0sZG+MWg/2ITMGWkT
6zpO2DKUvEIHpGPQsEDuxVs9DbIrxtXLnrtKQOLf6Qq+SYdBrAGv4RUxCnF0Dlwch2z0G
dy9MdmreGSnkUGS+d0k3nZD/pWHEFIMz+t5fqyJvhSz1vYGZd0c2N9+ZpjlUI0h+FtA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796386001;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:MIME-Version:From:Date:
X-Gm-Features:Message-ID:Subject:To:Content-Type;
bh=tX3q1/opPqPRy82V1naQvnhFtm6CZtrGyfYnBm8bOrM=;
b=lsi4aiJeCQ+XO+/EZDceDbxO3zNA6GydS9UvEpS+A0pkdtxCEpJ1ZewInhnN+WnNOsUM
QCQuDKajU3i1VWasuaAGZTx6bQ63yBYzHPAzTDTk/60vSBSVig57F2VAnvB/w/h7ykupk
/TjKcXmrSTQ61DIle2h9ZyQoDrwlIBBpL+0Xt1hrdkRQv7/g/PoxwreSElQEMFwbkro1w
J+DVFUfOzyiGpKr/78YzrrI3MNmTbLTXxI62U2V+eiMgdxLR15tJVBTRgf1BVnypvUn18
lNPIcjcva19LnKIQnqR/5BpxPi6GJHB5h9OVKdQKH4hi6cTp/tAQ7Xksw+hmtVQej3w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=egi97j5S;
arc=pass header.oldest-pass=0 smtp.remote-ip=209.85.217.53
X-Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5194F606A32C
for <git@vger.kernel.org>; Fri, 4 Dec 2026 12:06:41 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5194F606A32C
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-vs1-f53.google.com with SMTP id ada2fe7eead31-7cc53938a8fso659393137.2
for <git@vger.kernel.org>; Fri, 04 Dec 2026 04:06:41 -0800 (PST)
X-ARC-Seal: i=1; a=rsa-sha256; t=1796386000; cv=none;
d=google.com; s=arc-20260327;
b=G3lQfZ86W/vy0GsEA8/qusWpBVXJNsmS5jcsDow4+bdqI+FiW4p/uHV4N+8Y1mI69j
6vRzoC51ElzTIjmjZtROlZIkjT8cgH1bH/BtwxtNXr/Ynbiylv5Ui9onDIpfRt2d2I5S
sISJ8nsdRVQ0zqrE8intQFS1MTZBiIX5OQ17/Y7JEYah4IT5beIElvlVL8FzjEeLSw93
yDshZTsxTOAoBSJdfeAh6St8yejcnzNGOck47Z5RDYGtvGfbkFw/RyIkeggY25S4Vi1P
0JlLBJ2QJkFQRGttkgBjWo3gFSfIF9Tc/p8Ug2wYBE0Z9mfHQHo7in41BXvi/W7gWhh0
0kOg==
X-ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327;
h=to:subject:message-id:date:from:mime-version:dkim-signature;
bh=tX3q1/opPqPRy82V1naQvnhFtm6CZtrGyfYnBm8bOrM=;
fh=WfJB1YkHjfxkSMCsogHMbYc3pvCTmQRpLXh1eGJSZoM=;
b=pHpyFgrhvOvJB+36fGSYbc1Krm2944QdX6lXfLSGfGYqekwCPI3ne3L2X2kop5cFNG
LsE4iVhwWWd8yTlbCR5VdG5I95KQ1sgqwjIl2O9WDsIR8Ndp7QLBM65aIprYJUOYjgVd
5vspBSGr1ZY0ayV5zo5uf+AEi99KINrOeSqnYw/f3i9dQ63gpkIUez6JS4bWsyqkWt+s
RQEhDgcw6JvFBqd0SqlDDfFsI762Y6vETgy8kZkKkH6uqkH4WoTblTiRewIxQgiLsnCI
sVXBcEIsJR/cSFj3dwZ6w0BEp0Ur94ymaOYR2B5WLvKXhiHA8k9a81OUEj/N7Hu4C0j6
VAJg==;
darn=vger.kernel.org
X-ARC-Authentication-Results: i=1; mx.google.com; arc=none
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1796386000; x=1796990800; darn=vger.kernel.org;
h=content-type:to:subject:message-id:date:from:mime-version:from:to
:cc:subject:date:message-id:reply-to:content-type;
bh=tX3q1/opPqPRy82V1naQvnhFtm6CZtrGyfYnBm8bOrM=;
b=egi97j5SHKYrL6wGk60oTkx3Xj0rKLzgQam6pLNOXO3BDDRq40VvI777eShKS6389k
Dkat76TWGLHJNsB31a/RUG9ByQ/2pBVlFWO5TPQZGoyZt2/NR0IZEqfCwOE3Sm0gdaAN
Rb4SVwtCef9mYE37I+j1tgLXgyii6VLWfLrRgHZKNPNUJNFtC6HkBr6nHQLjuOxH9PT5
10rLg3igzke7JX9rSFGc7cznMFI0dtLMPhaExvDgqoKrKXz9EKrShHHbCOxLvGybFCTv
9Y4H6R65MzXMZ8IUEfaDNhUFgM3qPhPg6MUFbZ3XG+41TUsL6zkvlIz0xQ4bTDr0lfTB
q/bA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796386000; x=1796990800;
h=content-type:to:subject:message-id:date:from:mime-version:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=tX3q1/opPqPRy82V1naQvnhFtm6CZtrGyfYnBm8bOrM=;
b=dRZq0rU0nmcAfAD+/CEJH2d20bUHC5Du2bT8zlDTZgbuKu6OrEeH3+wB/Fxzdc4hgX
QH+EB5aFO6IJ9fuVrpUh+ocg1Ou0GIERUhjzLjVW1f0vYXbLm8PzIjcAZZlMU0JPCBbV
DnaF0VM3Oz9YaZY34aWiI6vxUbS+Oyt8fCk5dqr+KLAXUNzwEiGfVtNdB+NgiCTaCy1z
thUotiqLOPJkFF1NCdtW87Dw2MZh6BqkgTiMCWL4PN0A5zkfRDCCpNM/w7HQIoVoO4oU
uH+d12NRVVd9w8cHjNIplNuddTeto/90cAS4Owy+TqlCOVTyaVDHyU0yU4bvtI+b6kml
G4Xg==
X-Gm-Message-State: APuU4Z9amatobTlRm92Z/w0OvcYdIEIqJPHC4vBR/z3Auxp6RucR6FNV
bgKQeZ03fGJyO/rMR27Mv3yvs7/bFFtHSVLOB6pgv75GUw+dTSmEd5SZcKlXxx0ZKD5Lvru3z73
E5VocZbLVuLDzDeY+4TSTnvgpLcObFmz00JRe
X-Gm-Gg: AZFdTZfpHLWoKa2IMMvzchbXBDAA2KN+pZKtK1eaSglWihb9QtK3a1iQAo5jbn6SbkT
aAWab54tJ4Woib+ruIApZRXupQXgvtSy4FWnKgIr3C1ljUvCtjSUpDA3zYwxhTOpVcmds/mLBVB
RKl6JjRjxP0Q0OpJh/Zjlts2vbGXliaawp+D18IP32a+Yl3wJmdZAc1WKH+D7L39hPafZvRPIFh
S+wBkWr2p68uMNgjQUoxqIWb+XHpj3udFhfCJgibkWmY4OazSp8TVsVK2r5n+9rWMUr4v30Cw1x
dHgr5Poo150Mo+8zK25BNm03dIKTuoTnDfGCrgeIM2pxVgeW4TDKVvHlVw5gqYvzF/t9cMY0Elo
SVvcIr1DihxvymZQgrymFwjSfxOeyX2XpNbEPH4xncLb2F2kA6tKpS/qvLJwg9WW2jbXXumk=
X-Received: by 2002:a05:6102:4408:b0:7da:c675:10cc with SMTP id
ada2fe7eead31-7daec7ea5b5mr1397690137.21.1796386000242; Fri, 04 Dec 2026
04:06:40 -0800 (PST)
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Gm-Features: Aa3M54roja25G9ncknQ-YT4XsY26bwanC_fqWClY3QQf0sPb0avit1Wy5HQczDY