npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

timer-tools-jieni

v1.0.0

Published

时间格式化和倒计时工具

Downloads

3

Readme

Git 初始化与配置

初始化本地仓库

git init

配置用户信息

git config --global user.name "xxx"   # 设置全局用户名
git config --global user.email "[email protected]"   # 设置全局用户邮箱

配置界面

git config --global color.ui true   # 启用Git界面颜色
git config --global color.status auto
git config --global color.diff auto
git config --global color.branch auto
git config --global color.interactive auto

移除代理配置

git config --global --unset http.proxy   # 移除代理配置

查看用户配置

git config user.name   # 查看用户名
git config user.email  # 查看用户邮箱

代码提交与版本控制

暂存区操作

提交更改

git add xyz   # 将文件 xyz 添加到暂存区
git add .  || git add --all     # 添加当前目录下所有修改过的文件到暂存区
git commit -m 'xxx'   # 提交更改并附带描述信息

合并提交

git commit --amend -m 'xxx'   # 合并上一次提交(用于反复修改)
git commit -am 'xxx'   # 将添加和提交合并为一步

查看详细信息

git show dfb02e6e4f2f7b573337763e5c0013802e392818   # 显示某个提交的详细信息
git show dfb02   # 显示提交的前几位字符
git show HEAD   # 显示 HEAD 提交的日志

查看历史

git log   # 显示提交日志
    参数/选项:
        -n   # 限制要显示最近的提交数量n
        --stat   # 显示提交日志及相关文件变更
        --author=<author>  #根据作者过滤提交历史
        --grep=<pattern>  #通过提交消息的关键词或模式来搜索提交历史
        <branch> #查看特定分支的提交历史。
        --graph  #以图形化的方式显示提交历史,显示分支和合并的关系。

撤销更改

git rm xxx   # 从暂存区和文件系统中删除文件
git rm -r *   # 递归删除
git reset --hard HEAD   # 重置当前版本到 HEAD(通常用于合并失败回滚)
git revert dfb02e6e4f2f7b573337763e5c0013802e392818   # 撤销提交 dfb02e6e4f2f7b573337763e5c0013802e392818

打标签

git tag   # 显示已存在的标签
git tag -a v2.0 -m 'xxx'   # 创建带注释的标签
git show v2.0   # 显示标签 v2.0 的日志和详细信息

差异和比较

查看差异

git diff   # 显示未暂存的变更
git diff --cached   # 显示已暂存但未提交的变更
git diff HEAD^   # 比较与上一个版本的差异
git diff HEAD -- ./lib   # 比较与 HEAD 版本的 lib 目录差异

比较远程分支

git diff origin/master..master   # 比较远程分支 master 上有本地分支 master 上没有的差异
git diff origin/master..master --stat   # 只显示差异的文件,不显示具体内容

远程仓库管理

添加远程仓库

git remote add origin git+ssh://[email protected]/VT.git   # 添加远程仓库定义

拉取与推送

git pull origin master   # 从远程分支 master 获取并合并到当前分支
git push origin master   # 推送当前分支到远程 master 分支
git push origin :hotfixes/BJVEP933   # 删除远程 hotfixes/BJVEP933 分支
git push --tags   # 推送所有标签到远程仓库

获取与合并

git fetch   # 获取所有远程分支(不更新本地分支,需要额外合并)
git fetch --prune   # 获取所有原创分支并清除服务器上已删除的分支

分支管理

本地分支操作

git branch   # 显示本地分支
git branch --contains 50089   # 显示包含提交 50089 的分支
git branch -a   # 显示所有分支(包括远程)
git branch -r   # 显示所有远程分支
git branch --merged   # 显示已合并到当前分支的分支
git branch --no-merged   # 显示未合并到当前分支的分支
git branch -m master master_copy   # 重命名本地分支
git branch -d hotfixes/BJVEP933   # 删除分支(如果已合并到其他分支)
git branch -D hotfixes/BJVEP933   # 强制删除分支
git checkout -b master_copy   # 创建并切换到新分支 master_copy

远程分支操作

git checkout --track hotfixes/BJVEP933   # 检出远程分支并创建本地跟踪分支
git checkout v2.0   # 检出版本 v2.0
git checkout -b devel origin/develop   # 从远程分支 develop 创建新本地分支 devel 并检出

合并和 Cherry-pick

git checkout features/performance   # 检出已存在的 features/performance 分支
git merge origin/master   # 合并远程 master 分支到当前分支
git cherry-pick ff44785404a8e   # 合并提交 ff44785404a8e 的更改

其他操作

文件操作

git mv README README2   # 重命名文件 README 为 README2

其他命令