github建立遠程倉庫

1.configuregit

Guidance,i assume you have alreadly install git in your computer.github

$git config --global user.name "your name"web

$git config --global user.email "youremail@domain.com"app

check config information:dom

$git config --listssh

2.creat a public key:ui

$ssh-keygen -C 'your email address@gmail.com'spa

there a public-key file created by God in user directory ~/.ssh/. upload public-key: open github.com in web,choose Acconunt Settings and SSH Public Keys,select new add,copy the content of key from ~/.ssh/id_rsa.pub,then,check it by:code

$ssh -v git@github.comorm

3.create a local repository and initialization:

$git init

add files README.md and Makefile one by one,writing something in it.

4.add all files into local repository:

$git add .

5.commit all files into local repository:

$git commit -m "prompt message" -a

6.commit appointed file into local repository:

$git commit -m "prompt message" file

7.create a repository in github and copy URL,commit to git's project:

$git remote add origin ssh://URL

check:

$git remote -v

8.push your code into remote repository:

$git push origin master

相關文章
相關標籤/搜索