Get some help for using git

02 Dec 2018 (last updated on 09 Oct 2020) - written by Hardy Scheel

Table of content


Useful CLI Commands

Viewing Commit History

git log --all --decorate --oneline --graph

Tutorials

Get to know git as a version control system.


Cheat Sheets

Get a quick overview of relevant git commands for your daily work.


Advanced Git usage


Solving Problems


Helpful Tools


FAQ

Change the user for a repository

Git uses a hierarchical configuration of multiple levels. Settings in higher levels override values in lower levels. Lower levels inherit from higher levels (eg. local inherits from global).

You can configure an individual repository to use a specific user which overrides the global configuration. From the root directory of the repository, run the following on command line:

$ git config user.name "your name"
$ git config user.email your@email.com

The default user for all repositories is configured in the global configuration file in your home directory ~/.gitconfig. You can also run the following from command line:

$ git config --global user.name "your name"
$ git config --global user.email your@email.com