git常用命令

#显示 版本

git --version  

 

#生成公钥

ssh-keygen -t rsa -C "comment"

#新建一个本地仓库

git init

#查看本地仓库状态

git status

#配置本地用户名

git config --global user.name "xx"

#配置邮箱

git config --global email "12969722@qq.com"

#添加所有以.py结尾的文件到库中

git add *.py  

#把本地的仓库与远程的仓库关联

git remote add origin https://gitee.com/yjphhw/xx.git

#显示远程仓库的版本与本地仓库的状态

git remote -v

#将库中文件进行存档

git commit -m "first"

#将本在仓库发送到远程

git push

#从远程下载拉取

git pull

 

posted on 2021-04-02 11:32  看看完了  阅读(48)  评论(0编辑  收藏  举报

导航