git:汇总总结 深入浅出Git教程

写得非常清楚的说明和教程:https://www.cnblogs.com/syp172654682/p/7689328.html深入浅出Git教程

一、安装

   linux:

sudo apt-get install git

  Windows:

  直接官网下载安装

  在命令行输入:git 查看是否完成安装

二、设置

   设置用户名和邮箱:

$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"

  

三、基本操作

  添加所有文件

git add . 

  添加commit

git commit -m "some description"

  push文件到远程仓库

git push origin master

  clone文件

git clone https://github.com/vnpy/vnpy.git

  clone某个分支的文件

git clone -b <branch name> https://github.com/vnpy/vnpy.git

  

四、其他操作

 切换分支

五、错误解决

猜你喜欢

转载自www.cnblogs.com/timotong/p/9751850.html
今日推荐