Sunday, April 17, 2016

Github Cheatsheet

Set global user

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

create a new repository on the command line

echo "# apcombo" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/huntu2/apcombo.git
git push -u origin master

or push an existing repository from the command line

git remote add origin https://github.com/huntu2/apcombo.git
git push -u origin master

or import code from another repository

You can initialize this repository with code from a Subversion, Mercurial, or TFS project.

No comments:

Post a Comment