Re: I love git
On Sun, Oct 28, 2012 at 12:13:27PM +, Leo Lapworth wrote: > On 28 October 2012 12:06, David Cantrell wrote: > > Now, having deleted the branch on one machine, and pushed the delete to > > github, how do I make it disappear everywhere else that I've got a copy > > of the repo? > git help remote > You are looking for 'prune' Ta. -- David Cantrell | Cake Smuggler Extraordinaire What a lovely day! Now watch me spoil it for you.
Re: I love git
On Sun, Oct 28, 2012 at 12:06 PM, David Cantrell wrote: > Lovely. > > Now, having deleted the branch on one machine, and pushed the delete to > github, how do I make it disappear everywhere else that I've got a copy > of the repo? git push origin :branchname # note the significant colon Assuming your remote for github is 'origin'. You can also specify another branch to the left of the colon (e.g. foo:bar to push local branch foo to remote branch bar) /j
Re: I love git
On 28 October 2012 12:06, David Cantrell wrote: > Now, having deleted the branch on one machine, and pushed the delete to > github, how do I make it disappear everywhere else that I've got a copy > of the repo? > git help remote You are looking for 'prune' Enjoy Leo
Re: I love git
On Sat, Oct 27, 2012 at 11:32:08PM +, David Flynn wrote: > * David Cantrell (da...@cantrell.org.uk) wrote: > >Now, my question - can I delete the branch, while still leaving the tag > >in place? > Yes, branches (as are tags) are just pointers to commits. As long as > a commit is reachable via some pointer, it won't be GC'd. Lovely. Now, having deleted the branch on one machine, and pushed the delete to github, how do I make it disappear everywhere else that I've got a copy of the repo? -- David Cantrell | Cake Smuggler Extraordinaire Today's previously unreported paraphilia is tomorrow's Internet sensation
Re: I love git
On 28 October 2012 12:32, David Flynn wrote: > * David Cantrell (da...@cantrell.org.uk) wrote: >> >> Now, my question - can I delete the branch, while still leaving the tag >> in place? > > > Yes, branches (as are tags) are just pointers to commits. As long as > a commit is reachable via some pointer, it won't be GC'd. > > ..david You can even survive accidentally deleting a branch or tag most of the time, because there's always the "reflog", which contains a list of pointers to commits , and this reflog is only periodically trimmed. Yet another reason to love git. -- Kent
Re: I love git
* David Cantrell (da...@cantrell.org.uk) wrote: Now, my question - can I delete the branch, while still leaving the tag in place? Yes, branches (as are tags) are just pointers to commits. As long as a commit is reachable via some pointer, it won't be GC'd. ..david
Re: I love git
On 28 Oct 2012, at 00:18, David Cantrell wrote: > I needed to do a quick update to Number::Phone 2.0. But master in my git > repo is currently full of unfinished work. > > I love git, because it was just so damned easy to checkout the > release-2.0 tag, create a branch off that, patch, release, tag (with > release-2.0001), and merge the changes back into master. Doing all of > that in CVS doesn't bear thinking about, and doing it in svn, while > possible, would have required at least a little bit of thought, and I'm > not good at thinking this late in the day. > > Now, my question - can I delete the branch, while still leaving the tag > in place? Yes, happily. Tags and branches are both just symlinks to commits. Its just convention (that is enforced a bit by git) that tags don't change where branches do. -a
I love git
I needed to do a quick update to Number::Phone 2.0. But master in my git repo is currently full of unfinished work. I love git, because it was just so damned easy to checkout the release-2.0 tag, create a branch off that, patch, release, tag (with release-2.0001), and merge the changes back into master. Doing all of that in CVS doesn't bear thinking about, and doing it in svn, while possible, would have required at least a little bit of thought, and I'm not good at thinking this late in the day. Now, my question - can I delete the branch, while still leaving the tag in place? -- David Cantrell Professor of Unvironmental Science University of Human Progress