Skip to content

♻ Synchronizes the lastmod timestamps of the files in the working tree from the commit times of the Git repository

Notifications You must be signed in to change notification settings

dmotte/git-timesync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 

Repository files navigation

git timesync

When you make a git clone the created file are the current date. This script allow you to change the file timestamp to the same than the repository one.

How to install it

Clone this repository

git clone https://github.com/tst2005/git-timesync

or download the git-timesync file

wget https://github.com/tst2005/git-timesync/raw/master/bin/git-timesync

For it to be found by git, you need to install it in a directory in your $PATH. For user installation (no root needed, will only work for current user) we recommend ~/.local/bin. You can add the following to your .bashrc or .zshrc if you don't already have it configured.

export PATH=~/.local/bin:$PATH

Then just move git-timesync to ~/.local/bin/.

For system-wide installation, move it to something that's in the path of all users. We recommend /usr/local/bin/.

How to use it

Make a fresh clone of any git repository with git clone SOME_GIT_REPOSITORY_URL

See what is needed to sync with git timesync -n

If you want drop everything that is ok and see only what is needed to sync, use git timesync -n -q

If you want apply all change, use git timesync

If you want apply change only in one file, use git timesync THE_WANTED_FILE

License

I usualy release my code under MIT license, but I will follow the original author's one.

About

♻ Synchronizes the lastmod timestamps of the files in the working tree from the commit times of the Git repository

Topics

Resources

Stars

Watchers

Forks

Languages

  • Shell 100.0%