Skip to content

Instantly share code, notes, and snippets.

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

Thomas Caron thomas-rooty

🚲
busy riding around
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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: