The use of git is written on the blogs of many great gods, so I won't say more, here I only write some notes, so that they can be used in the future.
Installation is also very convenient, install git:
apt-get install git
Install the graphical interface, use gitk:
apt-get install gitk
Common instructions:
//初始化仓库
git init
//添加文件
git add *
//保存历史记录
git commit -m "xxxx"
/恢复某个版本的所有代码
git checkout <123456789> *
//查看所有历史记录
git log
//设置上传的位置,这里我使用的是码云
git remote add origin https://gitee.com/smile__5me/tmp.git
//上传
git push -u origin master
Common commands will be added later, to be continued.