Git & GitHub

Knowledge related to git and GitHub.


Git Configuration

Config related stuff for git.

User name & email

You can configure your name and email address using the following two commands:

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]

Change default editor

You can change your preferred editor using the following command:

$ git config --global core.editor vi

Badges

Ever wondered, where those neat Badges you can find all across GitHub come from? Or where to make your own?

First of all, those badges come from shields.io. You can create your own badge very easy. Just Use the following URL Sheme:

https://img.shields.io/badge/FIRST-SECOND-COLOR.svg

Let's try the following code:

https://img.shields.io/badge/doge-wow-AB00FF.svg

This gives you:

Doge, WOW!

Repository Size Badge

Want to brag about how big your Wonkydonky a Repository is? Now you can. With reposs (Repo Size Shields).

Just paste the following snippet in your repos README.md, but don't forget to change the Username and Repo values according to your needs.

![](https://reposs.herokuapp.com/?path=USERNAME/REPO)

GitHub Cheat Sheet

Did you know, that there is a GitHub Cheat Sheet?

It lists all features of GitHub and how to use them.

Emoji Cheat Sheet

There is also a Emoji Cheat Sheet, which lists all available Emojis for GitHub and some other services and explains how to use them.

The page itself is also on GitHub.

Changing a remote's URL

If you ever need to change the URL of a remote, you can do it like this:

$ git remote set-url origin [YOUR-NEW-URL]

By the way, you can list all your remotes with:

$ git remote -v