add the old snippet md files
This commit is contained in:
parent
fc0dd204c7
commit
bcf8313a4b
110 changed files with 3048 additions and 0 deletions
22
old_snippets/wipe-git-commit-times.en.md
Normal file
22
old_snippets/wipe-git-commit-times.en.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
title: "wipe git commit times"
|
||||
seo_description: "Snippet on how to remove timestamps from a git repo"
|
||||
date: 2022-01-14T10:59:50+01:00
|
||||
draft: false
|
||||
snippet_types:
|
||||
- git
|
||||
---
|
||||
|
||||
Some time you don't want everyone to know exactly when you committed.
|
||||
This command will wipe the time stamps and set them all to today at 0:00h.
|
||||
|
||||
```
|
||||
git filter-branch --env-filter '
|
||||
GIT_AUTHOR_DATE="$(date +%Y-%m-%d) 00:00:00+0000"
|
||||
GIT_COMMITTER_DATE="$(date +%Y-%m-%d) 00:00:00+0000"
|
||||
' -- --all
|
||||
```
|
||||
|
||||
It works best on fresh repos just be for pushing to remote for the first timee.
|
||||
|
||||
[source](https://exceptionshub.com/remove-time-and-time-zone-of-all-git-commits-but-keep-date.html)
|
||||
Loading…
Add table
Add a link
Reference in a new issue