Keep track of linux terminal commands in git

0

Is there a way we can keep track of commands executed in linux terminal in git? I would like to commit each command entered.

Abdul Rehman

Posted 2016-03-14T07:33:38.907

Reputation: 133

1If you can execute a script on logout from the terminal, you should be able to backup the ~./bash_history file. – davidgo – 2016-03-14T08:09:53.420

1

Another alternative would be to leverage off http://askubuntu.com/questions/93566/how-to-log-all-bash-commands-by-all-users-on-a-server and deposit it in GIT rather then logger, or use something to read the log file after its written.

– davidgo – 2016-03-14T08:11:34.530

@davidgo I can log command history in several other ways but I am just curious to make it work with git properly. It should commit without logout script. – Abdul Rehman – 2016-03-14T14:29:10.390

No answers