$ git push -u origin master Counting objects:20, done. Delta compression using up to 8 threads. Compressing objects:100% (10/10), done. Writing objects:100% (20/20), 1.60 KiB, done. Total 20 (delta 3), reused 0 (delta 0) To git@github.com:github-book/git-tutorial.git * [new branch] master -> master Branch master set up to track remote branch master from origin.像这样执行 git push 命令,当前分支的内容就会被推送给远程仓库 origin 的 master 分支。
$ git checkout -b feature-D Switched to a new branch 'feature-D'我们在本地仓库中创建了 feature-D 分支,现在将它 push 给远程仓库并保持分支名称不变。
$ git push -u origin feature-D Total 0 (delta 0), reused 0 (delta 0) To git@github.com:github-book/git-tutorial.git * [new branch] feature-D -> feature-D Branch feature-D set up to track remote branch feature-D from origin.现在,在远程仓库的 GitHub 页面就可以查看到 feature-D 分支了。
本文链接:http://task.lmcjl.com/news/6749.html