git 获取某个分支_获取Git分支在某个日期签出

git 获取某个分支

I don't use any type of git UI -- I try to be hardcore and stick to the command line.  This makes git usage quicker but I also probably miss out on a lot of the functionality that would be nice to know.  The functionality is there, of course, but without a nice icon or menu item you don't really think about it.

我不使用任何类型的git UI-我尽量保持顽固并坚持命令行。 这使得git的使用更快,但是我可能也错过了很多很高兴知道的功能。 当然有功能,但是没有漂亮的图标或菜单项,您根本不会考虑它。

I was browsing CommandLineFu and found a nice git snippet which provides you a listing of branches checked out on a given date:

我正在浏览CommandLineFu,发现了一个不错的git片段,它为您提供了在给定日期签出的分支的列表:


git reflog --date=local | grep "Sep 10 .* checkout: moving from .* to" | grep -o "[a-zA-Z0-9\-]*$" | sort | uniq


I love this snippet because I often forget recently created branch names (...grow up and delete old branches, David!), especially when leaving work for the weekend.  Handy!

我喜欢这个片段,因为我经常忘记最近创建的分支名称(…长大并删除旧的分支,David!),尤其是在周末休假时。 便利!

翻译自: https://davidwalsh.name/git-branches-date

git 获取某个分支

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值