GIT 使用入门-windows
1.msysGit网上下载安装,开始菜单 "Git --> Git Bash"打开
2.仓库配置 git config --global “namexx” git config --global "[email protected]"
3.创建版本库(GIT Bash下使用DOS命令) cd d: mkdir testgit cd testgit D盘git库创建完成
3.本地版本库放入相关文件 将文件添加到本地版本库
提交操作
git add 文件名 git commit ‘
随意’ 查看文件提交状态
git status
文件比对查看命令
git diff 文件名
查看日志
git log
查看版本号
git reset --hard
撤销删除操作
rm 文件名
恢复文件
git checkout -- 文件名
网络仓库
ssh-keygen -t rsa –C “[email protected]”
分支处理 创建并切换到分支命令
git checkout –b 分支名
查看当前分支
git branch
查看分支:git branch
创建分支:git branch name
切换分支:git checkout name
创建+切换分支:git checkout –b name
合并某分支到当前分支:git merge name
删除分支:git branch –d name
参考文献 https://blog.csdn.net/qq_36150631/article/details/81038485