How to view the log of all teams?

I am trying to see all the commands that I entered into the unix environment in my Git Bash.

Therefore, I am not trying to view a list of possible commands for the Git Hub. I am also not trying to view the logs for push and pull.

I just want to see what I typed on the command line. This is due to the fact that I recently encountered a connection problem in which I could not click or pull from my git. It happened all of a sudden. One minute ago, I was still pushing and jerking perfectly.

Then someone helped me resolve it using the command line in Git Bash.

My friend has the same problem right now. Therefore, I am looking for team logs in the hope that he will also solve his problem.

Write error: idle pipe fatal: the remote end hung up unexpectedly.

+7
source share
3 answers

You can do this with cat $HISTFILE .

Bash by default stores the last 500 commands in a history file, most likely called ~ / .bash_history. This file is in the $ HISTFILE variable (and the size is in $ HISTFILESIZE). You can get the path to the history file using echo $HISTFILE .

+14
source

If you're still in the shell, a quick way to see your recent history of session commands is with the command:

 $ history 

Very convenient for the scenario mentioned in the question, i.e. a colleague quickly typed several teams in your session, and you want to return to them and take a closer look at them.

+5
source
 history 1 

All entries in the history will be displayed here, starting from line 1.

+2
source

All Articles