How to config Git for auto-login and make the commands shorter?

images

I write this because every time when I working with Git, I need to login, I could say it take alot of time

so, how to config for Git to stop asking login information? The limitation for this article is only for Windows

Fowllow these step if you want to save time when using Git:

Using this command in Git console:
git config –global credential.helper winstore

this error is appear: “git: ‘credential-winstore’ is not a git command….”

Solution:

1. Download “git-credential-winstore.exe” from http://gitcredentialstore.codeplex.com/releases/view/103679

2. Copy to  “c:\Program Files (x86)\Git\libexec\git-core”

3. Using these command:

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

So after the first login since you made the configuration you don’t need to login anymore.

Enjoy

 

How to make the commands shorter:

We use Git Aliases follow this example:

git config --global alias.get 'pull origin'
git config --global alias.put 'push origin'

This example give you a shorter way for “pull”  and “push” commands

so instead of  “git pull origin brand-name”

you just use: “git get brand-name”

the same way for “push” also.

Best regards.

 

 

Add a Comment

Scroll Up