每个公司有每个公司管理代码的方式,最常用的就是git管理库
git采用了分布式版本库的方式,不必服务器端软件支持。
git init 初始化数据库
git status 查看数据库状态
git add . 将代码添加到本地数据库
git commit -m '' 将代码提交到本地数据库
git push 将代码push到远程仓库
git push origin master:xxx-----将代码push到名为xxx的分支
git pull= git merge+git fetch 拉取远程仓库的代码
git merge 合并分支
git fetch 拉取远程数据最新版本更新到本地
git checkout -b study 切换并创建study分支
git checkout study 切换到study分支
git branch -a 查看所有分支
git branch -r 查看远程所有分支
git branch study创建study分支
git diff 查看目前尚未暂存的更新目录
git log 查看commit的目录
git remote add origin git@github.com:username/Hello-World.git为远程仓库令起别名
管理代码常用的一些命令,在提交代码和拉取代码非常管用
关于更详细的教程详见 www.runoob.com/git/git-tut…