Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Give each git branch a note, to clearly record the role of each branch.
Give git branch notes. Because much git branch make me so difficult to understand. 给git分支加注释,解决分支过多无法分辨各个分支的作用的问题
工作繁重下,测试不断提来bug,不断的在分支之间切来切去来改bug,改完一个bug之后想再切回原来分支,发现这么多分支,忘记了哪一个分支是刚刚的了,或许你可以单独找个地方记录分支的作用,但是不同的项目同样的分支名又会导致分支混乱或者是查看分支还要开着一个文件.
又或者是长时间不打开一个项目,忽然该项目需要修改,面对着这么多分支,不知道从何改起?
这个时候需要来一个命令行工具来帮助分辨某一个分支到底是做什么的.
branchinfo借助node的强大能力,来实现命令行中为git的分支来添加注释.
如果你还没有安装node,请访问https://nodejs.org/en/
在node被安装的时候同时还会安装一个包管理器npm,使用该包管理器来安装该包.
npm install branchinfo -g
在成功安装之后会在你的命令行中添加一个命令gb
打开你的项目根目录,添加一个新文件.gitbranch
,键入以下内容:
master 主分支
0.0.1 为项目添加README文件
0.0.2 增加一个特别棒的功能,自动写代码
0.0.3 自动写JavaScript,放开程序员的手
0.0.4 以上都是开玩笑的啦
为你的项目添加以上分支:
git branch 0.0.1
git branch 0.0.2
git branch 0.0.3
git branch 0.0.4
这个是用来测试的分支,千万不要用来开发功能哦.
在完成以上之后,在命令行中键入gb
,然后回车,你就会发现你的注释已经生效:
0.0.1 - 为项目添加README文件
0.0.2 - 增加一个特别棒的功能,自动写代码
0.0.3 - 自动写JavaScript,放开程序员的手
0.0.4 - 以上都是开玩笑的啦
* master - 主分支
分支的注释会被加粗显示,当前处于的分支的注释会被加下划线.
FAQs
Give each git branch a note, to clearly record the role of each branch.
We found that branchinfo demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.