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!),尤其是在周末休假时。 便利!
git 获取某个分支