Last active
December 10, 2015 02:39
-
-
Save run/4369313 to your computer and use it in GitHub Desktop.
git notes
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
场景一: | |
从某处得到了一个git仓库, 比如 git clone mit/jos.git 到本地了, | |
现在在github上建立空的Run/jos.git项目,想把本地的这份代码上传到github上去,肿么办? | |
方法: | |
$git branch -a | |
* lab1 | |
remotes/origin/HEAD -> origin/lab1 | |
remotes/origin/lab1 | |
remotes/origin/lab2 | |
remotes/origin/lab3 | |
remotes/origin/lab4 | |
remotes/origin/lab5 | |
remotes/origin/lab6-2011 | |
$git push git@github.com:Run/jos.git lab1 | |
这样就把当前所在的分支 origin/lab1 拷贝到了 github上的Run/jos.git中,并且分支的名字也叫lab1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment