Hi Folks,

 

just came across to write how i configured my Git.

This will be just a short blog regarding my configuration with a short explanation.

 

You can configure your git using the command:

you can choose to configure it for just the current repo with –local, for the current user with –global or system wide for all users –system. If you have configured something in system and you are setting the same configuration in global, the system will be overridden.

So, –local overrides –global and –system and –global overrides –system.

 

Define the author name to be used for all commits by the current user.

 

Define the author email to be used for all commits by the current user.

 

Limit pushes just to your current branch, not all of them. This is default for GIT 2.0 and higher

The oposit would be “matching” which pushes all branches up to GitHub, but this is most probably something you do not want.

 

To default all new branches to fetch and rebase – not merge:

 

To record any merge conflict resolutions and reuse them automatically:

 

To colorize git’s output for increased readability:

 

Create a shortcut for a Git command.

so you can add for example the command “git s” to execute “git status -s”. This is a cleaner way of showing the status.

To show a more detailed view of the log, config the lg command like this

Configure a pushAll alias to push also submodules in git on demand.

 

To configure line endings correctly on Linux/Mac:

and on Windows:

Both of the above settings strip carriage return on saving files to the repository.

 

Define the text editor used by commands like git commit.

 

Maybe, HUB is something you want to install to. Hub extends the commands you need to interact with GitHub via command line.

check it out here.

 

Configure GIT

Also published on Medium.

Tagged on:

Leave a Reply

Follow

Get every new post on this blog delivered to your Inbox.

Join other followers:

Welcome Damir Kusar

Log in

Lost your password?
%d bloggers like this: