[yast-devel] Disturbing branches at GitHub (broken/...)
Hi, You've probably already found out that there are a lot of "broken" branches at our GitHub repositories: For instance: * upstream/broken/master * upstream/broken/openSUSE-10_0 * upstream/broken/openSUSE-10_1 * upstream/broken/openSUSE-10_2 * ... AFAIK, these branches were left there from the unsuccessful migration from SVN to GitHub. So, what are we going to do with them? From my point of view, they are not needed and just disturb there. Thanks in advance Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Monday 20 August 2012 11:21:57 Lukas Ocilka wrote:
Hi,
You've probably already found out that there are a lot of "broken" branches at our GitHub repositories:
For instance:
* upstream/broken/master * upstream/broken/openSUSE-10_0 * upstream/broken/openSUSE-10_1 * upstream/broken/openSUSE-10_2 * ...
AFAIK, these branches were left there from the unsuccessful migration from SVN to GitHub. So, what are we going to do with them? From my point of view, they are not needed and just disturb there.
We kept these branches when we (Martin V., Bernhard and me) did the repo repair during our last workshop. We told the team to use rebase to prevent merges between the repaired and the "broken" branches. The idea behind was to not break everybodys checkout right away but to give them the chance to do a rebase and later in time delete the broken branches on github. You can just delete these branches now, as all people should have rebased now. But please tell the team to also delete these branches in their local checkouts or to no longer push them, otherwise they would be recreated with each push. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On 08/20/2012 04:18 PM, J. Daniel Schmidt wrote:
You can just delete these branches now, as all people should have rebased now. But please tell the team to also delete these branches in their local checkouts or to no longer push them, otherwise they would be recreated with each push.
They are quite a lot of branches in almost every YaST repository. Of course we needed them before but IMO not anymore. Wouldn't be better to remove them somehow in an automatic way? Thx Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Monday 20 August 2012 17:04:45 Lukas Ocilka wrote:
On 08/20/2012 04:18 PM, J. Daniel Schmidt wrote:
You can just delete these branches now, as all people should have rebased now. But please tell the team to also delete these branches in their local checkouts or to no longer push them, otherwise they would be recreated with each push.
They are quite a lot of branches in almost every YaST repository. Of course we needed them before but IMO not anymore. Wouldn't be better to remove them somehow in an automatic way?
Sure, automating this makes a lot of sense, go ahead. But don't forget to inform the team as otherwise somebody might push these branches again. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On 08/23/2012 05:52 PM, J. Daniel Schmidt wrote:
Sure, automating this makes a lot of sense, go ahead. But don't forget to inform the team as otherwise somebody might push these branches again.
Here's a possible way how to delete all the "broken" branches semi-automatically: * Backup your SSH keys (~/.ssh) * Create a new SSH key without passphrase (ssh-keygen) * Add this *.pub key to https://github.com/settings/ssh Now you can clone/push/fetch without entering the key * In each cloned directory, run my simple script to delete all the "broken" branches * Remove the key from your system, remove it also from GitHub * Eventually restore your keys from backup --- script (one line) --- for BRANCH in `git branch -a | grep "\/origin\/broken" | sed 's/.*origin\/broken/:broken/'`; do echo $BRANCH; git push origin $BRANCH; done --- script (one line) --- Well, it's not an engineering gem but it does the job :) Feel free to enhance it. Bye Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On 09/03/2012 04:12 PM, Lukas Ocilka wrote:
--- script (one line) --- for BRANCH in `git branch -a | grep "\/origin\/broken" | sed 's/.*origin\/broken/:broken/'`; do echo $BRANCH; git push origin $BRANCH; done --- script (one line) ---
I haven't heard any comments for "delete the branches for all repos at once or everyone 'their' repos as they wish?" after I asked on the call today, so I will consider it as "let's wait" ;) for now. For instance, Thomas has already deleted the branches from some repos. BTW, even if you delete the branches from github/yast/* they will stay untouched in your fork. I usually delete my fork and recreate it again. Is there a better way? Bye Lukas -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Tue, Sep 04, Lukas Ocilka wrote:
On 09/03/2012 04:12 PM, Lukas Ocilka wrote:
--- script (one line) --- for BRANCH in `git branch -a | grep "\/origin\/broken" | sed 's/.*origin\/broken/:broken/'`; do echo $BRANCH; git push origin $BRANCH; done --- script (one line) ---
I haven't heard any comments for "delete the branches for all repos at once or everyone 'their' repos as they wish?" after I asked on the call today, so I will consider it as "let's wait" ;) for now.
For instance, Thomas has already deleted the branches from some repos.
BTW, even if you delete the branches from github/yast/* they will stay untouched in your fork. I usually delete my fork and recreate it again. Is there a better way?
I used the following to remove them from local forks: for i in `git branch -a | grep origin/broken`; do git branch -r -d `echo $i | sed s:remotes/::`; done Tschuess, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Tuesday 04 September 2012 13:50:27 Lukas Ocilka wrote:
I usually delete my fork and recreate it again. Is there a better way?
Yes, properly setup your loca repo to be able to track two remotes: 1. the main repo (read-only, or r/w if you also want to resolve conflicts) 2. your fork (r/w, push there by default and do pull requests) Then follow both remotes. There is no need to delete forks and recreate it. Ciao, Daniel -- J. Daniel Schmidt <jdsn@suse.de> SUSE LINUX Products GmbH Research & Development Maxfeldstr. 5 HRB 16746 (AG Nürnberg) D-90409 Nürnberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
Dne 3.9.2012 16:12, Lukas Ocilka napsal(a): [...]
Here's a possible way how to delete all the "broken" branches semi-automatically:
* Backup your SSH keys (~/.ssh) * Create a new SSH key without passphrase (ssh-keygen) * Add this *.pub key to https://github.com/settings/ssh Now you can clone/push/fetch without entering the key
Um, why do we need the new key? Just to avoid entering the key passphrase at each clone/push? You can easily use ssh-agent for this, it is started automatically in KDE session (probably also in other desktops, not tested). Just run "ssh-add" and enter the passphrase. Then you can use the key without entering the passphare (works with all commands like ssh, scp, git... which use the key). If you want to lock the key again (for security reasons, e.g. when leaving the computer) just call "ssh-add -D" and then you will be asked for the passphrase again. (See man ssh-agent, man ssh-add for details.) -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
On Mon, Sep 03, 2012 at 04:12:36PM +0200, Lukas Ocilka wrote:
On 08/23/2012 05:52 PM, J. Daniel Schmidt wrote:
Sure, automating this makes a lot of sense, go ahead. But don't forget to inform the team as otherwise somebody might push these branches again.
Here's a possible way how to delete all the "broken" branches semi-automatically:
* Backup your SSH keys (~/.ssh) * Create a new SSH key without passphrase (ssh-keygen) * Add this *.pub key to https://github.com/settings/ssh Now you can clone/push/fetch without entering the key * In each cloned directory, run my simple script to delete all the "broken" branches * Remove the key from your system, remove it also from GitHub * Eventually restore your keys from backup
--- script (one line) --- for BRANCH in `git branch -a | grep "\/origin\/broken" | sed 's/.*origin\/broken/:broken/'`; do echo $BRANCH; git push origin $BRANCH; done --- script (one line) ---
Well, it's not an engineering gem but it does the job :) Feel free to enhance it.
Done: https://github.com/yast/yast-meta/blob/master/github-scripts/remove-broken-b... Yes, you can call me Lightning now. -- Martin Vidner, Cloud & Systems Management Team http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
On 03/22/2013 04:13 PM, Martin Vidner wrote:
Well, it's not an engineering gem but it does the job :) Feel free to enhance it.
Done: https://github.com/yast/yast-meta/blob/master/github-scripts/remove-broken-b...
Yes, you can call me Lightning now.
Thank yo' mister Light-'ning! ;) -- Lukas Ocilka, Cloud & Systems Management Department SUSE LINUX s.r.o., Praha -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (6)
-
J. Daniel Schmidt
-
Ladislav Slezak
-
Lukas Ocilka
-
Lukas Ocilka
-
Martin Vidner
-
Thomas Fehr