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.
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/
.
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
I usualy release my code under MIT license, but I will follow the original author's one.