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

auto-commit

v1.0.0

Published

```

Downloads

4

Readme

Usage

Principle

|命令|作用| |-|-| |git --amend|简单地来说,可以理解成对最后一次提交做修正| |git --no-edit|| |git --date|见下文|

有时需要修改上次git commit的时间,比如之前将代码提交到本地库中,现在想将这次提交推送到远程仓库,但是这次提交的时间显示还是昨天的时间,下面提供一个办法用于修改上次提交的时间: 使用:

git commit --amend --date="commit_time"

commit_time的格式比较难记,不过有个小技巧,我们可以先在命令行输入:

date -R
Sat, 24 Dec 2016 18:12:09 +0800

这个命令的输出格式与git commit –amend –date命令要填写的日期格式相同,自己再稍加修改一下即可。 如果我们只是想将上次git commit的时间 改为当前时间,可以使用以下两个命令:

git commit --amend --date="$(date -R)"
# 或
git commit --amend --date=`date -R`

对于如何修改任意git commit的时间,也简单,按照date -R命令的输出格式自己构造commit_time即可。

git commit --amend --date="Sun, 25 Dec 2016 19:42:09 +0800"
git commit --amend --no-edit --date="Sun, 25 Dec 2016 19:42:09 +0800"
git push origin master --force

date参数

Change history: amending and editing dates There might be certain situations where you want to alter the timestamps git assigns to commits. There are a couple of ways that you can do this.

Use --date

The --date option allows you to specify the author date that git attaches to the commit. Here we can’t use approxidate unfortunately, only fixed dates will work (YYYY.MM.DD, MM/DD/YYYY, DD.MM.YYYY, RFC 2822 and ISO 8601 are all valid).

git commit --date="Wed Feb 16 14:00 2037 +0100"

We can also use amend to change the timestamp of a previous commit:

git commit --amend --date="Wed Feb 16 14:00 2037 +0100"

Unfortunately --date will only change the GIT_AUTHOR_DATE, not GIT_COMMITTER_DATE. If this is a problem, you may need to…

Manually set GIT_AUTHOR_DATE and GIT_COMMITTER_DATE

时间格式

  • rfc2822: Mon, 3 Jul 2006 17:18:43 +0200
  • iso8601: 2006-07-03 17:18:43 +0200
  • local: Mon Jul 3 15:18:43 2006
  • short: 2006-07-03 (not in 1.9.1, works in 2.3.0)
  • relative: see commit 34dc6e7:
5.seconds.ago, 
2.years.3.months.ago, 
'6am yesterday'
  • raw: see commit 7dff9b3 (git 1.6.2, March 2009)

  • internal raw git format - seconds since epoch plus timezone (put another way: 'date +"%s %z"' format)

  • default: Mon Jul 3 17:18:43 2006 +0200