Skip to content

Instantly share code, notes, and snippets.

View thomas-rooty's full-sized avatar
🚲
busy riding around

Thomas thomas-rooty

🚲
busy riding around
  • Versailles, France
  • 03:00 (UTC +01:00)
View GitHub Profile
@thomas-rooty
thomas-rooty / git-rebase-all.py
Created October 6, 2022 09:56
Allows you to rebase all branches onto master at once
# Get all branches from a GitHub repo
# and rebase them on top of master
import subprocess
def get_branches():
branches = []
p = subprocess.Popen(['git', 'branch', '-r'], stdout=subprocess.PIPE)
for line in p.stdout: