版本管理
网上由很对教程,不进行赘述
git clone url 克隆项目 git add 关联文件到git git commit 提交 git push 推送 git pull 更新 git status 查看状态
git pull 解决冲突 git commit git push
#hashid是提交编号
git log git reset --hard #hashid git reflog合并某分支到当前分支
git merge namegit fetch 更新不合并,比pull更安全
git fetch origin master git log -p master..origin/master git merge origin/master相当于
git fetch origin master:tmp git diff tmp git merge tmpgit pull 更新并合并
git pull origin master创建分只并切换
git checkout -b develop相当于
git branch develop git checkout develop列出所有分支
git branch描述信息message 名称name 提交idhashid
git tag -m #message #name [#hashid]暂存,查询暂存列表,回复缓存,缓存清理
git stash git stash list git stash apply git stash clear