一、 首先注册git
php
最终生成三个文件:就是一些版权和申明。git
git init
此时win+R打开cmd,进入咱们本地工程目录,在该目录下已经存在一个.py文件,此时输入该命令,会出现git的文件夹(隐藏的,只能查看隐藏文件才能够看到),表示当前工程目录变成了git仓库。
github
git status
查看状态
git add .
固然,咱们也能够指定文件的添加,好比:git add num.pyshell
git commit -m "first commit"
不论是修改仍是从新提交,这一步都须要,并且first commit能够依次改为second commit。
假如这一步出现问题以下:
“ *** Please tell me who you are.
Run
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'lym@LYM-PC.(none)')
”
此时说明没有关联你的帐户信息,进行关联皆能够了。浏览器
git config --global user.email "you@example.com" git config --global user.name "Your Name"
git remote add origin https://github.com/zlxzlxzlx/Test.git
bash
git pull --rebase origin master
或者git push -u origin master(反正本身发现不对,查资料发知道github中的README.md文件不在本地代码目录中,因此这条命令不对,要是提早本地仓库有README.md,就能够用。能够在步骤5以前使用git clone https://github.com/saucxs/BPS.git下载README.md到本地)
先将远程仓库的三个文件下载到本地,保证本地和远程的是同样的。
ssh
git push -u origin master
此时远程Github仓库也有咱们上传的文件了。
ide
git status
网站
git add *
this
git commit -m "更新说明"
git pull
git push origin master
不出意外,打开GitHub已经同步了
git clone https://github.com/lymwpc/phoneemail_etxact.git
一、最好是用谷歌浏览器,Github网站对别的浏览器不太支持。 二、README.md文件很重要,是一种maekdown格式缩写.md,用以存储咱们想要说明的信息,能够本身编写。