git-shuffle

Randomize Git commit timestamps to enhance privacy

git clone https://git.8pit.net/git-shuffle.git

 1.Dd $Mdocdate: October 4 2020 $
 2.Dt GIT-SHUFFLE 1
 3.Os
 4.Sh NAME
 5.Nm git-shuffle
 6.Nd randomize timestamps of git commits
 7.Sh SYNOPSIS
 8.Nm git-shuffle
 9.Op Fl a
10.Op Fl v
11.Ar refspec
12.Sh DESCRIPTION
13The
14.Xr git-commit 1
15utility associates timestamps with each commit.
16This exposes coding hours and may be perceived as a privacy violation.
17The
18.Nm
19utility mitigates this pitfall by randomizing timestamps associated with existing commits.
20Currently, only the time is randomized while all other date information is left in tact.
21.Pp
22As Git timestamps are part of the commit object, doing so requires
23.Nm
24to rewrite the existing Git history.
25Two approaches are supported for doing so:
26.Bl -diag -offset indent
27.It Rebasing
28This is the default strategy, it rebases all commits according to the
29given
30.Ar refspec .
31The
32.Ar refspec
33syntax is further described in
34.Xr gitrevisions 7 .
35.It Amending
36Contrary to rebasing, this strategy only modifies the tip of the current branch.
37Primarily intended to be used from
38.Xr githooks 5 .
39.El
40.Pp
41The options are as follows:
42.Bl -tag -width Ds
43.It Fl a
44Amend the tip of the branch instead of rebasing.
45This causes the
46.Ar refspec
47argument to be ignored.
48.It Fl v
49Activate verbose output.
50For each modified commit write the commit hash to standard output.
51.El
52.Sh EXIT STATUS
53.Ex -std git-shuffle
54.Sh SEE ALSO
55.Xr git-commit 1 ,
56.Xr git-rebase 1 ,
57.Xr githooks 5
58.Sh AUTHORS
59.An Sören Tempel Aq Mt soeren@soeren-tempel.net
60.Sh CAVEATS
61The utility modifies timing information of committer and author.