TangoMan Commitator is an awesome bash script to fake git commit history.
This may be useful as pedagogic tool to teach git, train and play around with git commands without worrying about causing any real damage to an existing repository.
This may also be useful to fake contribution activity on github.com, no contribution will be created on Saturdays and Sundays for a more realistic simulation ;-)
TangoMan Commitator can also fake whole branches.
Create new repository from web interface here: https://github.com/new
$ git clone https://github.com/FooBar/repository_name.gitConfigure git with your github.com account user email for fake contributions to show up on your profile.
$ git config user.email "you@example.com"Copy commitator.sh and execute script from your local repository folder:
$ ./commitator.shEnter starting and ending dates when prompted.
TangoMan Commitator allows dates as epoch time (e.g: 1514761200) or +%Y-%m-%d format (e.g: 2018-01-01)
$ git pushYou can set any commit date with the following command:
$ git commit -m "FooBar" --date="Y-m-d_H-M-S"You can change last commit date with the following command:
$ git commit --amend --date="Y-m-d_H-M-S"You can also change last commit author with the following command:
$ git commit --amend --author "User Name <email@example.com>"You can also use git rebase to change commit history:
$ git rebase -i xxxxxxxxxxxxx_commit_hash_xxxxxxxxxxxxxxselect edit in front of desired commits when rebase prompt pops up.
If you're lost with vim your can check this awesome cheat sheet
In case you panic you can abort rebase with:
$ git rebase --abort
You will then be able to change commits date and author with git commit --amend command with --no-edit parameter (to avoid edit prompt to pop up everytime)
git commit --amend --date="Y-m-d_H-M-S" --author="User Name <email@example.com>" --no-editAnd continue to edit next commit
git rebase --continueCopyrights (c) 2018 Matthias Morin
Distributed under the MIT license.
If you like TangoMan Commitator please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects.