Git工具入门--安装及简单实用
安装方法
安装Git for Windows;如不清楚可以观察下述链接:
https://blog.csdn.net/chengyuqiang/article/details/54178683
简单入门操作
1、与GitHub连通测试
ssh -T [email protected]
2、在GitHub中新建一个仓库;
完成相关设置:
3、在本地的代码库文件夹内右键;Git bash here,打开Git命令行界面。
4、克隆GitHub上仓库到本地。
其中username和projectname为你GitHub对应的
git clone [email protected]:username/projectname.git
5、在本地克隆的项目文件夹内可以进行新建程序文件,如 helloworld.py。可以通过命令查看变动状态及将文件变化上传到GitHub中。
查看Git状态
git status
依次执行下属三条命令实现将本地的修改变化添加到GitHub段的master仓库中:
git add helloworld.py
git commit -m "first test of git, add the helloworld into clone"
git push