"Git" set up on Git

If you just got a new computer or are using Git for the first time, you may find some of these commands useful. Note: these commands are from a Mac user

Global settings are stored in a system .gitconfig file; view that file by using the command:

$ cat ~/.gitconfig

Single repo settings stored in the /.git/config in your project folder

 

View current configurations in the terminal window
$ git config --list
$ git config <level> --list
 
Pass in specific levels of configuration
# Single repo     --local
# Current user    --global
# All users       --system
 
Assign username, email, text editor and color settings
$ git config --global user.name "John Doe"
$ git config --global user.email "johndoe@users.noreply.bitbucket.org"
$ git config --global core.editor <editor-symlink>
$ git config --system color.ui true
 
Explicity tell Git to be case-sensitive (OS X and Windows)
$ git config core.ignorecase false
 
Rebase by default when doing git pull
$ git config --global pull.rebase true

 

If you have any other useful commands to share, leave a comment below.

0 comments

Comment

Log in or Sign up to comment
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Agile

How Davin Studer gets Confluence to do everything he wants it to do...except dishes

  @Davin Studer holds many interests, including but not limited to health tech and Star Trek. Read on to discover more about Davin, from his favorite Confluence macros to his favorite lit...

190 views 1 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you