git clone   --depth 1  --branch  branch/tag_name remoteurl

[lake@localhost source]$ git clone   --depth 1  --branch   sshfs_2_5      https://github.com/libfuse/sshfs
Cloning into 'sshfs'...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 19 (delta 0), reused 11 (delta 0), pack-reused 0
Receiving objects: 100% (19/19), 50.07 KiB | 178.00 KiB/s, done.
Note: switching to '6b4415ada44e0cbf1924f534cd04d117a5a4dbd3'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

[lake@localhost source]$ cd sshfs/
[lake@localhost sshfs]$ git branch
* (no branch)
[lake@localhost sshfs]$ git log
commit 6b4415ada44e0cbf1924f534cd04d117a5a4dbd3 (grafted, HEAD, tag: sshfs_2_5)
Author: Miklos Szeredi <mszeredi@suse.cz>
Date:   Tue Jan 14 15:23:31 2014 +0100

    Released 2.5
[lake@localhost sshfs]$
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值