理想中的作业流程
- 在本机上通过pycharm写代码,然后通过git这个工具把代理同步到web端。
- 然后在服务器上使用git pull下来,然后运行。
- 如果在服务器端运行的过程中出现了什么问题,再回到本机上修改代码,再push到web端。
- 然后再在服务器上pull下来,运行。
大体就是这么个想法。
基本使用
先通过网页,在github上新建一个仓库。 然后可以通过git clone https://xxx.git
克隆这个仓库,也可以现在本地做一些工作,然后通过git remote add origin https://xxx.git
来关联远程仓库。 然后就是些基本命令:
git add .
将当前工作目录中的所有文件添加到工作区git commit -m "."
提交到(我也不知道是哪)git push
推到web端git pull
down都服务器上
其他命令
git branch branch_name
新建一个分支git checkout branch_name
切换分支