当前位置:   article > 正文

git 获取某个分支_获取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片段,它为您提供了在给定日期签出的分支的列表:

  1. 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 获取某个分支

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/415593
推荐阅读
相关标签
  

闽ICP备14008679号