Skip to content

Instantly share code, notes, and snippets.

View hugoduraes's full-sized avatar

Hugo Durães hugoduraes

View GitHub Profile
# Rename branch locally
git branch -m old_branch new_branch

# Delete the old branch
git push origin :old_branch

# Push the new branch, set local branch to track the new remote
git push --set-upstream origin new_branch
ssh -f -T -N -L <remote port>:<local IP>:<local port> <username>@<remote ip>
```