[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use of git branches
From: |
John Wiegley |
Subject: |
Re: Use of git branches |
Date: |
Fri, 06 Nov 2015 11:05:36 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) |
>>>>> Juanma Barranquero <address@hidden> writes:
> I know that some old branches (though not all) are perhaps of historical
> interest. But, isn't there any way to remove them and yet keep their content
> from being pruned? Tags or something?
You can move branches into a different "ref space" on the server (this is not
tested yet, but should give the idea):
git push origin
refs/remotes/origin/old-branches/foo:refs/history/branches/foo
git push origin :refs/old-branches/foo
Historical branches are not fetched until you add the corresponding refspec to
your .git/config file:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/history/*:refs/remotes/origin/history/*
Now you can write:
git log origin/history/branches/Boehm-GC
John
p.s. This same trick works for GitHub PRs, btw, by using:
fetch = +refs/pull/*:refs/remotes/origin/pr/*
Now allowing you to: git checkout -b pr/1233 origin/pr/1233
- Re: [Emacs-diffs] master 2b316c0: ; * CONTRIBUTE: Add section about the bug tracker, (continued)
- Use of git branches (was: [Emacs-diffs] master 2b316c0: ; * CONTRIBUTE: Add section about the bug tracker), Nicolas Richard, 2015/11/06
- Re: Use of git branches (was: [Emacs-diffs] master 2b316c0: ; * CONTRIBUTE: Add section about the bug tracker), Eli Zaretskii, 2015/11/06
- Re: Use of git branches (was: [Emacs-diffs] master 2b316c0: ; * CONTRIBUTE: Add section about the bug tracker), Juanma Barranquero, 2015/11/06
- Re: Use of git branches, David Kastrup, 2015/11/06
- Re: Use of git branches, Juanma Barranquero, 2015/11/06
- Re: Use of git branches, David Kastrup, 2015/11/07
- Re: Use of git branches, Juanma Barranquero, 2015/11/07
- Re: Use of git branches,
John Wiegley <=
- Re: Use of git branches, Juanma Barranquero, 2015/11/06