git
来源:互联网 发布:迅雷7优化版 编辑:程序博客网 时间:2024/06/01 09:07
git
git: git是目前世界上最先进的分布式版本控制系统
集中式(svn/cvs):必须要联网,从服务器上获取版本信息
分布式(git):每个人的电脑都相当于一台服务器,即便服务器中断,代码也会在我们的本地保留
git –version 回车(检验gitbash是否安装成功)
$ git clone url(在github上创建仓库并克隆在本地)
安装完之后再全局配置
git config –global user.email “email@example.com”
git config –global user.name “Your Name”
cd 文件的路径 //切换到某个文件夹 master代表主分支
git clone url
git status //查看当前的状态
git pull //刷新
git add 1.txt //将修改的文件添加到暂存区( . 或者 * 代表上传所有)
git commit -m ‘提交的注释’
git push origin master //提交到主分支
在.gitconfig里添加如下代码 每次提交不必在输入用户名和密码
[credential]
ghelper = store
git branch //查看分支
git branch name //创建新的分支
git checkout name //切换分支
上面两句合并一句 git checkout -b name //创建并切换分支
git branch -D name ///删除本地某一个分支
git push origin -d name//删除远程分支
git log //查看每次提交的版本 (退出:ctrl+z)
返回上一级目录 cd ..
[credential]
helper = store
- git
- git
- Git
- Git
- Git
- Git
- git
- git
- Git
- GIT
- git
- GIT
- Git
- git
- git
- Git
- GIt
- git
- 动态规划——最大字段和
- pageoffer页面调用
- 分享一个MongoDB可视化工具rockmongo-on-windows
- Permutations:排列
- redis nosql使用
- git
- ARM存储系统的学习
- java jvm 内存划分
- 求解答No result defined for action myaction.LoginAction and result success错误
- Oracle undo表空间爆满的解决
- 关于Android项目导入AAR容易出现的坑
- iOS 银联支付开发流程
- Mac下安装的软件打不开
- biji