版本管理工具git介绍
source link: http://yuanfentiank789.github.io/2016/08/14/git/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
版本管理工具初探
版本管理工具简介
版本管理工具的作用
1、备份文件
2、记录历史
3、多端共享
4、回到历史文件
5、方便团队开发
版本管理工具发展史
版本控制发展史(cvs->svn->git->github) cvs是始祖,svn诞生于2000年,git诞生于2005年。 svn是集中式,git是分布式。 CVS 最早期的版本控制软件,是把文件集中保存到中心服务器 SVN 是在CVS的基础上的加强版,可以还原到某个时间段 git 是分布式的版本控制软件 github 是网站托管,是基于git。 集中式:中心服务器,需要联网(cvs svn) 分布式:拥有版本库即可(git)
Git常用命令
git help 查看所有git可用命令
git checkout .
未提交本地修改之前pull
git stash
git pull
git stash pop
创建本地分支,并切换到该分支
git checkout -b dev
关联本地分支到远程
git push origin dev
git branch –set-upstream-to=origin/dev_776_basemap_mvp dev_776_basemap_mvp
checkout远程分支,并切换到该分支
git checkout -b 本地分支名 远程分支名
查看远程分支
git branch -r
Git pull 强制覆盖本地文件
git fetch –all
git reset –hard origin/master
git pull
AS中看不到别人提交的远程分支
切换到仓库根目录,执行git fetch.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK