-
-
Save renexdev/cef405d262c8202da0a519cd2d0171d6 to your computer and use it in GitHub Desktop.
Git: Track Remote Branches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create new remote branch | |
git push origin origin:refs/heads/new_branch_name | |
# Make sure everything is updated | |
git fetch origin | |
# Check your branch has been created | |
git branch -r | |
# Track a remote branch | |
git branch --track new_branch_name origin/new_branch_name | |
# Checkout remote branch | |
git checkout new_branch_name | |
# Delete local branch | |
git branch -d branch_name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment