Skip to content

Latest commit

 

History

History
103 lines (71 loc) · 2.88 KB

File metadata and controls

103 lines (71 loc) · 2.88 KB

TangoMan Commitator

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.

How to fake contributions on github

Create new repository on github web interface

Create new repository from web interface here: https://github.com/new

Clone new repository on your local machine

$ git clone https://github.com/FooBar/repository_name.git

Configure git

Configure git with your github.com account user email for fake contributions to show up on your profile.

$ git config user.email "you@example.com"

Execute TangoMan Commitator

Copy commitator.sh and execute script from your local repository folder:

$ ./commitator.sh

Enter 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)

Push repository to gihub

$ git push

How did you do that ?

You 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_xxxxxxxxxxxxxx

select 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-edit

And continue to edit next commit

git rebase --continue

License

Copyrights (c) 2018 Matthias Morin

License Distributed under the MIT license.

If you like TangoMan Commitator please star! And follow me on GitHub: TangoMan75 ... And check my other cool projects.

Matthias Morin | LinkedIn