Mailinglist Archive: yast-devel (7 mails)

< Previous Next >
Re: [yast-devel] Disturbing branches at GitHub (broken/...)
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
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.



Lukas Ocilka, Cloud & Systems Management Department
SUSE LINUX s.r.o., Praha
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation