git指令

作者: 奶瓶SAMA | 来源:发表于2017-03-11 20:51 被阅读0次
==============版本管理员操作========================
第一步: 创建数据仓库

git init --bare shared.git

==============开发人员1操作=============================

第二步:复制仓库到本地

git clone /f/software/repository/git/shared.git/ . (注意有个点,表明当前目录)

第三步:设置个人信息

git config user.name "user1"
git config user.email "user1@163.com"


第五步:新建一个文件

echo "User1 add content" > index.jsp

第六步:提交文件

git add index.jsp
git commit -m "User1 add the file"


第七步:把自己的仓库提交到公共服务器

git push origin master

==============开发人员2操作=============================

第八步:复制仓库到本地

git clone /f/software/repository/git/shared.git/ .

第九步:设置个人信息

git config user.name "user2"
git config user.email "user2@163.com"

第十步:忽略无需版本控制的文档

echo "*.txt" > .gitignore

第十一步:新建一个文件

echo "User2 add content" >> index.jsp

第十二步:提交文件

git add index.jsp
git commit -m "User2 add the file!"


第十三步:把自己的仓库提交到公共服务器

git push origin master


==============开发人员1操作=============================
第十四步:下载服务器最新数据

git pull

修改文件 vim

相关文章

  • git远程仓库关联

    一.GitHub常用指令 git的基本使用指令:git init ...

  • Linux和git指令

    git常用指令 1.基本指令 git init —— 新建git仓库git add 文件/文件夹 —— 将...

  • 初识git,用git 上传项目到GitHub

    分享一些git基本指令,不喜勿喷! git的基本使用指令 git init 初始化git仓库 git add . ...

  • Git常用指令

    Git指令 git status git add ZiguiXiaoYuan git add ZiguiXiaoY...

  • git设置指令别名

    git设置指令别名 git拥有许多指令,并且允许为这些指令设置别名, 提高开发效率.通过config命令对一些指令...

  • 2019-03-17

    git 指令git commit -a -m ''这里再写上自己的注释"这句话指令相当于执行了 git a...

  • git config

    git 配置 ,简化指令 git config -l git status --> git stgit confi...

  • git使用率最高的指令

    git常用指令

  • 2018-08-13

    对于会使用git的人,git add,git commit,git checkout ,git reset这些指令...

  • Git 常用指令记录

    标准指令以及功能 指令功能git clone 仓库链接从远端仓库克隆工程git init初始化仓库git chec...

网友评论

      本文标题:git指令

      本文链接:https://www.haomeiwen.com/subject/joszgttx.html