Created
April 27, 2009 10:38
-
-
Save aemkei/102432 to your computer and use it in GitHub Desktop.
push existing local branch to remote
This file contains hidden or 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
#syntax | |
git checkout -b name_of_local_branch | |
#example | |
git checkout -b experimental |
This file contains hidden or 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
#syntax | |
git push my_repo name_of_local_branch:refs/heads/name_of_remote_branch | |
#example | |
git push origin experimental:refs/heads/experimental |
This file contains hidden or 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
# syntax | |
mate .git/config | |
[branch "name_of_local_branch"] | |
remote = my_repo | |
merge = refs/heads/name_of_remote_branch | |
#example | |
mate .git/config | |
[branch "experimental"] | |
remote = origin | |
merge = refs/heads/experimental |
This file contains hidden or 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
# syntax | |
git fetch | |
git checkout --track -b name_of_local_branch origin/name_of_remote_branch | |
# example | |
git fetch | |
git checkout --track -b experimental origin/experimental |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment