Git Snippets


Global Settings

$ git config --global "Bob.Smith"
$ git config --global ""
$ git config --global core.editor nano
$ git config --global merge.tool meld

Lists repo config settings

$ git config -l

Show repo username

$ git config

Set repo username

$ git config "Bob.Smith"


Show repo remotes

$ git remote -v

Rename remote from origin to github

$ git remote rename origin github

Add a remote

$ git add remote github


Importing a project

$ cd /project/directory
$ git init

Take Snapshot of curent files

$ git add .

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.