Skip to content

Instantly share code, notes, and snippets.

@peterberkenbosch
Created June 7, 2014 08:16
Show Gist options
  • Save peterberkenbosch/1238a9c4c4c006d99b9c to your computer and use it in GitHub Desktop.
Save peterberkenbosch/1238a9c4c4c006d99b9c to your computer and use it in GitHub Desktop.
function fix() {
git rebase -i HEAD~$1
}
function branch_name() {
branch_name="$(git symbolic-ref HEAD 2>/dev/null)"
branch_name=${branch_name##refs/heads/}
echo $branch_name
}
function spush() {
git push upstream `branch_name`
}
function spull() {
git pull --rebase upstream `branch_name`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment