Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git log out user from command line

Tags:

git

Is there a command for logging out of git? I'm turning my computer over to somebody else and don't want the git to be attached to my account in the terminal.

like image 275
byrdr Avatar asked Jan 30 '15 14:01

byrdr


People also ask

How do I exit git Log in CMD?

You can press q to exit. git hist is using a pager tool so you can scroll up and down the results before returning to the console.

How do I exit from git log?

To exit git log, type “q” or “z”. Or type “h” to seek for help.

How do I log into a different user in git bash?

For Windows User: Follow Instructions: Control Panel >> User Account >> Credential Manager >> Windows Credential >> Generic Credential You can change git credential click modify>>provide uname and password Or you can remove git credential. next time when you'll push repo it'll ask you for credential.


2 Answers

I came across this same problem, and the above answer didn't work for me because github was being fed my credentials through windows credential manager instead of git bash.

You may have to check windows credential manager and delete the github entry under control panel > user accounts > credential manager > Windows credentials > Generic credentials

like image 159
man guy Avatar answered Sep 18 '22 20:09

man guy


Remove your SSH keys from ~/.ssh (or where you stored them).

Remove your user settings:

git config --global --unset user.name git config --global --unset user.email git config --global --unset credential.helper 

Or all your global settings:

git config --global --unset-all 

Maybe there's something else related to the credentials store, but I always used git over SSH.

like image 45
3 revs, 3 users 89% Avatar answered Sep 20 '22 20:09

3 revs, 3 users 89%