Re: [PATCH] git push --track
- From
Tay Ray Chuan <rctay89@gmail.com>
- Date
- Jan 14, 2010, 01:27 UTC
- Message-ID
- <be6fef0d1001131727r128c7727td2b948018d308719@mail.gmail.com>
- In-Reply-To
- <op.u6g8jnixg402ra@nb-04>
Hi,
On Wed, Jan 13, 2010 at 11:12 PM, Rudolf Polzer <divVerent@alientrap.org> wrote:
Show 28 quoted lines
> Hi, > > I'd like a feature to automatically "transform" a non-tracking local branch > into a tracking branch on push. A patch to do that is attached. > > Usage: > > git branch mybranch > git checkout mybranch > ... > git push --track origin mybranch:mybranch > > will not just perform the push, but also write a block > > [branch "mybranch"] > remote = origin > merge = refs/heads/mybranch > > to the git configuration so the branch becomes tracking. > > This should be a simpler alternative to the otherwise usual procedure > > git push origin mybranch:mybranch > git config branch.mybranch.remote origin > git config branch.mybranch.merge refs/heads/mybranch > > Are there any chances for this getting added to official git - or an > alternate convenient way convert a local to a tracking branch?
before I put up my comments on the patch, I wonder if git-push is the best place to add this feature, as git-push usually deals with "pushing" data to another repo.
I think git-branch would be a better place to do this.
-- Cheers, Ray Chuan