How can I git clone https://github.com/apache/falcon/tree/0.6.1?
This question already has an answer here:
As specified in the man of git clone, you have to use the -b option.
Man page concerning the -b option :
--branch , -b Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository's HEAD, point to branch instead. In a non-bare repository, this is the branch that will be checked out.
--branch can also take tags and detaches the HEAD at that commit in the resulting repository.
It's now obvious, but you have to do the following command to clone a specific branch on a remote project:
git clone -b [BRANCH] [REMOTE].
In your case :
git clone -b "0.6.1" https://git-wip-us.apache.org/repos/asf/falcon.git falcon
You can clone a repository, and after that you can check out a specific branch. There's no such thing as cloning a branch. When you use git clone -b, the repo will be cloned and then the specific branch will be checked out.
链接地址: http://www.djcxy.com/p/90440.html上一篇: 克隆git存储库时我拥有哪个分支?