Skip to content

Instantly share code, notes, and snippets.

@mhoofman
Created January 9, 2011 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhoofman/772021 to your computer and use it in GitHub Desktop.
Save mhoofman/772021 to your computer and use it in GitHub Desktop.
Git Commands

To clone a repo from a windows local file system

C:\some\dir\> git clone --local file:///C:/path/to/repo my_project

Find the location of remote repos

git remote show {remote name}

Set global user name and user email and pretty colors

git config --global user.name "Name"
git config --global user.email "Email@email.email"
git config --global color.ui auto

List out config variables

git config -l

Individual repo user settings

cd my_other_repo
git config user.name "Not Tekkub"
git config user.email "not@tekkub.net"

Export

git archive master | tar -x -C /somewhere/else
git checkout-index -a -f --prefix=/somewhere/else
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment