branch

使用Git Flow规范!

匿名 (未验证) 提交于 2019-12-03 00:09:02
Production 分支 也就是我们经常使用的Master分支,这个分支最近发布到生产环境的代码,最近发布的Release, 这个分支只能从其他分支合并,不能在这个分支直接修改 Develop 分支 这个分支是我们是我们的主开发分支,包含所有要发布到下一个Release的代码,这个主要合并与其他分支,比如Feature分支 Feature 分支 这个分支主要是用来开发一个新的功能,一旦开发完成,我们合并回Develop分支进入下一个Release Release分支 当你需要一个发布一个新Release的时候,我们基于Develop分支创建一个Release分支,完成Release后,我们合并到Master和Develop分支 Hotfix分支 当我们在Production发现新的Bug时候,我们需要创建一个Hotfix, 完成Hotfix后,我们合并回Master和Develop分支,所以Hotfix的改动会进入下一个Release 所有在Master分支上的Commit应该Tag 分支名 feature/* Feature分支做完后,必须合并回Develop分支, 合并完分支后一般会删点这个Feature分支,但是我们也可以保留 分支名 release/* Release分支基于Develop分支创建,打完Release分之后,我们可以在这个Release分支上测试

What do these words mean in Git: Repository, fork, branch, clone, track?

人走茶凉 提交于 2019-12-03 00:05:08
问题 I'm honestly not clear on the semantics here. They're all about copies/variants of a code+history unit, but past that I'm not sure I could say. Is this logical structure explained somewhere? 回答1: A repository is simply a place where the history of your work is stored. It often lives in a .git subdirectory of your working copy - a copy of the most recent state of the files you're working on. To fork a project (take the source from someone's repository at certain point in time, and apply your

Merge branch with trunk

こ雲淡風輕ζ 提交于 2019-12-03 00:02:48
问题 Using TortoiseSVN, I need to take changes I've done in a branch and then merge them with trunk. I am the only developer on this project, so I know trunk hasn't changed. I am learning SVN so that eventually my team can use it. Basically, I want my trunk to look exactly like the branch. In pre-svn world, I would just copy the files in my branch folder, delete the files in the trunk folder, and then copy branch into trunk. In TortoiseSVN, I've tried Reintegrate a branch , Merge a range of

git命令大全

匿名 (未验证) 提交于 2019-12-02 23:57:01
原文链接: 点我 可以多次添加然后在提交 注意Git的版本号(commit id)是SHA1值ea34578d5496d7dd233c827ed32a8cd576c5ee85 Git的版本回退速度非常快,因为Git在内部有个指向当前版本的HEAD指针,当你回退版本的时候,Git仅仅是把HEAD从指向append GPL 当我们想从一个旧版本退回到新版本但是我们关闭了shell窗口,不能查看之前的commit id了,就可以通过 $ git reflog 查看到之前的版本的commit id $ git reset --hard 3628164 工作区和暂存区 工作区: 就是我们通$ git init 创建的代码库的所有文件但是不包括 .git文件(版本库) 什么是修改? 修改只能在被add 到暂存区以后才能被提交 在file 已经修改还未add的时候 file已经修改和添加到了暂存区,还未commit 如果file修改已经提交到本地仓库 $ git commit -m "delete file" // 提交删除 由于这个Key也不是用于军事目的,所以也无需设置密码,所以一路回车就好, 如果顺利会在user下UserName目录中生成一个.ssh目录里面有id_rsa和id_rsa.pub两个文件 id_rsa是私钥,不能泄露出去,id_rsa.pub是公钥

git基础命令

匿名 (未验证) 提交于 2019-12-02 23:57:01
1、强制覆盖本地文件(丢弃所有本地改动与提交,并用远程仓库覆盖本地仓库) git fetch --all git reset --hard origin/master git pull 2、查看分支 查看本地:git branch 查看远程分支:git branch -r 查看所有(远程和本地)分支:git branch -a 3、管理本地分支 创建本地分支zhifei:git branch zhifei 切换到本地的master分支:git checkout master 拉取远程master分支到本地zhifei分支:git pull origin master:zhifei 推送本地zhifei分支到远程的master分支: 先切换到本地的zhifei分支 git checkout zhifie 再提交本地的zhifei到远程master分支 git push origin zhifei:master (可强制覆盖到远程git push origin -f zhifei:master) 然后 git pull   add ./ git status   git commit -m"提交"   git push origin zhifei:master 通过git branch可以查看当前所在哪个本地分支(绿色的master分支为当前所在的本地分支,此时共有2个分支

git团队开发

匿名 (未验证) 提交于 2019-12-02 23:49:02
一、选择线上仓库 1、注册码云账号并登录 https://gitee.com/ 2、创建仓库 点击创建之后跳转到此页面 二、git团队开发 1、管理员:配置与线上账号密码系统的本地全局账号密码 2、将本地仓库提交到远程仓库的时候需要配置公钥秘钥 ①仓库---->管理---->添加公钥---->添加个人公钥 ②配置公钥之前需要生成公钥:点进https://gitee.com/help/寻求帮助 ③生成公钥:ssh-keygen -t rsa -C '2451349606@qq.com',用户生成本机的ssh公钥提供给管理员 ④添加公钥:管理员 添加开发者提供的公钥到 个人公钥 并非是 公钥,并给开发者提供远程仓库SSH地址 3、本地仓库提交到远程仓库 5、开发者配置本地局部账号邮箱 git config user.name 'zgs1121' git config user.email '2451349606@qq.com' 5、进入本地项目仓库进行开发, 可以查看远程源 6、开发过程中提交新功能到远程仓库时,一定要遵循先拉取(pull),在提交(push): ①提交新功能(先提交,提交后拉取,可能就会出现冲突) ②这时候出现冲突,去解决冲突,解决冲突好了之后再提交到本地仓库 ③提交到版本库时,还需要再拉取 ④当显示是最新版本的时候也就是没有版本冲突了之后就可以push提交到远程仓库

Git 的origin和master解析

匿名 (未验证) 提交于 2019-12-02 23:43:01
https://blog.csdn.net/qq_15037231/article/details/77878275 首先要明确一点,对git的操作是围绕3个大的步骤来展开的(其实几乎所有的SCM都是这样) 1. 从git取数据(git clone) 2. 改动代码 3. 将改动传回git(git push) 这3个步骤又涉及到两个repository,一个是remote repository,再远程服务器上,一个是local repository,再自己工作区上。其中 1, 3两个步骤涉及到remote server/remote repository/remote branch, 2涉及到local repository/local branch。git clone 会根据你指定的remote server/repository/branch,拷贝一个副本到你本地,再git push之前,你对所有文件的改动都是在你自己本地的local repository来做的,你的改动(local branch)和remote branch是独立(并行)的。Gitk显示的就是local repository。 我们用(远程仓库名)/(分支名) 这样的形式表示远程分支 ,所以origin/master指向的是一个remote branch(从那个branch我们clone数据到本地)

Git 的origin和master解析

匿名 (未验证) 提交于 2019-12-02 23:43:01
https://blog.csdn.net/qq_15037231/article/details/77878275 首先要明确一点,对git的操作是围绕3个大的步骤来展开的(其实几乎所有的SCM都是这样) 1. 从git取数据(git clone) 2. 改动代码 3. 将改动传回git(git push) 这3个步骤又涉及到两个repository,一个是remote repository,再远程服务器上,一个是local repository,再自己工作区上。其中 1, 3两个步骤涉及到remote server/remote repository/remote branch, 2涉及到local repository/local branch。git clone 会根据你指定的remote server/repository/branch,拷贝一个副本到你本地,再git push之前,你对所有文件的改动都是在你自己本地的local repository来做的,你的改动(local branch)和remote branch是独立(并行)的。Gitk显示的就是local repository。 我们用(远程仓库名)/(分支名) 这样的形式表示远程分支 ,所以origin/master指向的是一个remote branch(从那个branch我们clone数据到本地)

关于refs/for/ 和refs/heads/

匿名 (未验证) 提交于 2019-12-02 23:43:01
https://www.cnblogs.com/onelikeone/p/6857932.html 1. 这个不是git的规则,而是gerrit的规则, 2. Branches, remote-tracking branches, and tags等等都是对commite的引用(reference),引用都以 “refs/……”表示. 比如 remote branch: origin/git_int(=refs/remotes/origin/git_int) , local tag: v2.0(=refs/tags/v2.0) , local branch: git_int(=refs/heads/git_int) … 3. 简单点说,就是refs/for/mybranch需要经过code review之后才可以提交;refs/heads/mybranch不需要code review。 (since you want to directly push into the branch, rather than create code reviews. Pushing to refs/for/* creates code reviews which must be approved and then submitted. Pushing to refs/heads/* bypasses