{"thread":{"id":"25601","subject":"Pushing everything","startedAt":"2010-10-31T05:47:38Z","lastAt":"2010-10-31T12:30:32Z","messageCount":6,"participants":["Maaartin","Tay Ray Chuan","Andreas Schwab","Mathias Lafeldt","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"154866","messageId":"loom.20101031T064406-734@post.gmane.org","threadId":"25601","inReplyTo":null,"subject":"Pushing everything","fromName":"Maaartin","fromEmail":"grajcar1@seznam.cz","sentAt":"2010-10-31T05:47:38Z","receivedAt":"2010-10-31T05:47:38Z","isPatch":false,"sender":{"key":"grajcar1@seznam.cz","avatar":null},"body":"I'd like to push all my branches and tags to the server, but for whatever reason \n\"--all\" ignores tags and is incompatible with \"--tags\". I could imagine there's \na reason I'm not experienced enough to see?\n\nIt seems to me that \"--mirror\" is quite unusable, since it force-overwrites the \nremote repo and even deletes refs not locally present. Obviously, a mirror can't \nbe shared, and it doesn't seem to me to be the ideal backup solution for a \nsingle person.\n\nHowever, even if \"git push -all -tags\"  worked, I'm not sure it's a good idea \nfor project with more collaborators. There may be conflicts or other problems \nand quite often the pushing occurs just before leaving so it's no good time to \nstart resolving conflicts. Can a shared repo be used as a sort of backup as \nwell? I'd like a possibility to backup all my work there anytime without needing \nto care about anything. This could work by creating sort of private refs in case \nof any problems, or whatever. Is there something like this, or am I thinking \nastray? I'd suppose, something like this could be very useful for a company \nwhere it'd provide a simple backup solution for everybody.\n"},{"id":"154868","messageId":"AANLkTikG5yTPwkjmnSv8yg2QRNNjDu_JxBdHzLBjO1RP@mail.gmail.com","threadId":"25601","inReplyTo":"loom.20101031T064406-734@post.gmane.org","subject":"Re: Pushing everything","fromName":"Tay Ray Chuan","fromEmail":"rctay89@gmail.com","sentAt":"2010-10-31T06:43:26Z","receivedAt":"2010-10-31T06:43:26Z","isPatch":false,"sender":{"key":"rctay89@gmail.com","avatar":"https://avatars.githubusercontent.com/u/61553?v=4"},"body":"On Sun, Oct 31, 2010 at 1:47 PM, Maaartin <grajcar1@seznam.cz> wrote:\n> I'd like to push all my branches and tags to the server, but for whatever reason\n> \"--all\" ignores tags and is incompatible with \"--tags\". I could imagine there's\n> a reason I'm not experienced enough to see?\n\nYou can spell the refs explicitly, like this:\n\n  $ git push refs/heads/* refs/tags/*\n\nModify the glob to taste.\n\n-- \nCheers,\nRay Chuan\n"},{"id":"154881","messageId":"m28w1epu9o.fsf@whitebox.home","threadId":"25601","inReplyTo":"AANLkTikG5yTPwkjmnSv8yg2QRNNjDu_JxBdHzLBjO1RP@mail.gmail.com","subject":"Re: Pushing everything","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2010-10-31T09:48:51Z","receivedAt":"2010-10-31T09:48:51Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Tay Ray Chuan <rctay89@gmail.com> writes:\n\n> On Sun, Oct 31, 2010 at 1:47 PM, Maaartin <grajcar1@seznam.cz> wrote:\n>> I'd like to push all my branches and tags to the server, but for whatever reason\n>> \"--all\" ignores tags and is incompatible with \"--tags\". I could imagine there's\n>> a reason I'm not experienced enough to see?\n>\n> You can spell the refs explicitly, like this:\n>\n>   $ git push refs/heads/* refs/tags/*\n\nThe first argument needs to be a reference to a repository, so insert an\norigin here.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"154882","messageId":"loom.20101031T113039-859@post.gmane.org","threadId":"25601","inReplyTo":"m28w1epu9o.fsf@whitebox.home","subject":"Re: Pushing everything","fromName":"Maaartin","fromEmail":"grajcar1@seznam.cz","sentAt":"2010-10-31T10:48:43Z","receivedAt":"2010-10-31T10:48:43Z","isPatch":false,"sender":{"key":"grajcar1@seznam.cz","avatar":null},"body":"Andreas Schwab <schwab <at> linux-m68k.org> writes:\n> \n> Tay Ray Chuan <rctay89 <at> gmail.com> writes:\n> \n> > On Sun, Oct 31, 2010 at 1:47 PM, Maaartin <grajcar1 <at> seznam.cz> wrote:\n> >> I'd like to push all my branches and tags to the server, but for whatever \nreason\n> >> \"--all\" ignores tags and is incompatible with \"--tags\". I could imagine \nthere's\n> >> a reason I'm not experienced enough to see?\n> >\n> > You can spell the refs explicitly, like this:\n> >\n> >   $ git push refs/heads/* refs/tags/*\n> \n> The first argument needs to be a reference to a repository, so insert an\n> origin here.\n\nNice, that works. It answers only a part of my questions, but maybe I can \ncomplete it. I want to use a repo as both a private backup (which everybody may \nread but nobody should) and a shared base. So maybe something like\n\ngit push origin +refs/heads/*:refs/heads/maaartin-* +refs/tags/*:refs/tags/\nmaaartin-* :\n\nwould do both the backup (where everything gets prefixed by my name) and normal \npushing of tracking branches. Could it work? Should I try it out or can it be \ndestructive?\n"},{"id":"154883","messageId":"4CCD53DD.4090605@debugon.org","threadId":"25601","inReplyTo":"loom.20101031T113039-859@post.gmane.org","subject":"Re: Pushing everything","fromName":"Mathias Lafeldt","fromEmail":"misfire@debugon.org","sentAt":"2010-10-31T11:32:45Z","receivedAt":"2010-10-31T11:32:45Z","isPatch":false,"sender":{"key":"misfire@debugon.org","avatar":"https://avatars.githubusercontent.com/u/158074?v=4"},"body":"On 10/31/2010 11:48 AM, Maaartin wrote:\n> Andreas Schwab <schwab <at> linux-m68k.org> writes:\n>>\n>> Tay Ray Chuan <rctay89 <at> gmail.com> writes:\n>>\n>>> On Sun, Oct 31, 2010 at 1:47 PM, Maaartin <grajcar1 <at> seznam.cz> wrote:\n>>>> I'd like to push all my branches and tags to the server, but for whatever \n> reason\n>>>> \"--all\" ignores tags and is incompatible with \"--tags\". I could imagine \n> there's\n>>>> a reason I'm not experienced enough to see?\n>>>\n>>> You can spell the refs explicitly, like this:\n>>>\n>>>   $ git push refs/heads/* refs/tags/*\n>>\n>> The first argument needs to be a reference to a repository, so insert an\n>> origin here.\n> \n> Nice, that works. It answers only a part of my questions, but maybe I can \n> complete it. I want to use a repo as both a private backup (which everybody may \n> read but nobody should) and a shared base. So maybe something like\n> \n> git push origin +refs/heads/*:refs/heads/maaartin-* +refs/tags/*:refs/tags/\n> maaartin-* :\n> \n> would do both the backup (where everything gets prefixed by my name) and normal \n> pushing of tracking branches. Could it work? Should I try it out or can it be \n> destructive?\n\nHi,\n\nwhy don't you try pushing to a local clone first, and then check the results?\n\nThis puts your data at no risk.\n\n-Mathias\n"},{"id":"154890","messageId":"20101031123031.GE18845@localhost.localdomain","threadId":"25601","inReplyTo":"loom.20101031T064406-734@post.gmane.org","subject":"Re: Pushing everything","fromName":"Konstantin Khomoutov","fromEmail":"flatworm@users.sourceforge.net","sentAt":"2010-10-31T12:30:32Z","receivedAt":"2010-10-31T12:30:32Z","isPatch":false,"sender":{"key":"flatworm@users.sourceforge.net","avatar":null},"body":"On Sun, Oct 31, 2010 at 05:47:38AM +0000, Maaartin wrote:\n\n> I'd like to push all my branches and tags to the server, but for whatever reason \n> \"--all\" ignores tags and is incompatible with \"--tags\". I could imagine there's \n> a reason I'm not experienced enough to see?\n> \n> It seems to me that \"--mirror\" is quite unusable, since it force-overwrites the \n> remote repo and even deletes refs not locally present. Obviously, a mirror can't \n> be shared, and it doesn't seem to me to be the ideal backup solution for a \n> single person.\n> \n> However, even if \"git push -all -tags\"  worked, I'm not sure it's a good idea \n> for project with more collaborators. There may be conflicts or other problems \n> and quite often the pushing occurs just before leaving so it's no good time to \n> start resolving conflicts. Can a shared repo be used as a sort of backup as \n> well? I'd like a possibility to backup all my work there anytime without needing \n> to care about anything. This could work by creating sort of private refs in case \n> of any problems, or whatever. Is there something like this, or am I thinking \n> astray? I'd suppose, something like this could be very useful for a company \n> where it'd provide a simple backup solution for everybody.\nYou can have any number of remotes configured for your local repo.\nSo you can easily have one \"private\" remote repo which you use solely\nfor \"backup\" pushes and one \"shared\" remote repo to which you do careful\nselective pushes.\n\nNote that I'm obsessed with the \"backup\" idea no less than you and when\nI started using Git I learned about --mirror and did mirror push to my\nprivate remote repo before leaving office, just as you explained.\nBut then I realized this was just a hangover from my Subversion\nbackgrounds, and that to really need --mirror doing regular programming,\nyou have to be fantastically, inhumanly productive. I mean, after a\ntypical one work day programming session you usually have a clear idea\nabout what branch(es) and what tags, if any, you have to push for backup\npurposes. So it really might be a non-issue.\n"}]}