Skip to content

Instantly share code, notes, and snippets.

View lowsky's full-sized avatar
:electron:
#graphql #reactjs #webdevop

lowsky lowsky

:electron:
#graphql #reactjs #webdevop
View GitHub Profile
@lowsky
lowsky / GitRepoUpdateTimestamp.sh
Last active August 29, 2015 14:20 — forked from jdoconnor/gist:32ef0314cecb80157c4e
Helper script to update the Last modified timestamp of files in a Git SCM Projects working Copy.
#!/bin/bash -e
####
# based on https://gist.github.com/jdoconnor/32ef0314cecb80157c4e which itself was
# based on https://gist.github.com/jeffery/1115504
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
#!/bin/bash -x
REPO="${1}"
SHA1="${2}"
repofragment=$(cd "$REPO"; git remote -v | grep origin | grep push | sed -e 's/.*github\.com.\(.*\)\.git.*/\1/')
url="https://github.com/${repofragment}/commit/${SHA1}"
open "$url"