branch

warning: refname 'xxx' is ambiguous when using git-svn

半城伤御伤魂 提交于 2019-11-30 02:39:26
I am using git as a frontend to Subversion (via git svn). So, for every svn trunk/branch I have remote branch in git named "remotes/xxx". For example "remotes/trunk", "remotes/coolfeature". Now I want have one "default" local branch for every remote branch, to use it for dcommit. The problem is that I want such branches to be named after Subversion branches, like "trunk", "coolfeature", so I have the following branches in git: trunk coolfeature remotes/trunk remotes/coolfeature The problem is that every time I reference "trunk" or "coolfeature" git complains branch name is ambiguous. Not a big

「小技巧」使用Git从其他分支merge个别文件

試著忘記壹切 提交于 2019-11-30 01:52:07
小明发现在实际项目开发过程中,总会遇到各种各样的情况,比如一个大型的项目或版本迭代可能不是一次上线,可能会分好几次上线,这时候就会涉及创建多个分支,分别开发。 项目背景 产品经理:我们本次开发三个功能,列表页功能、详情页功能、系统消息功能,分两次上线,先上列表功能,再上详情页和系统消息。 小明:好的吧。 紧接着,小明就将本次需求分为2个分支,分别为A、B。 A:开发列表页功能 B:开发详情页功能、系统消息功能 原计划 :产品经理说先上列表功能,那小明就先开发A分支,列表功能很快开发完成(厉害吧)。 计划有变 :风云变幻,第二天小明按照计划开发B分支,开发到一半,产品经理突然说目前的系统消息功能(位于B分支)比较紧急,需要和列表功能(位于A分支)一起上线,当时小明就懵逼了。赶紧暂停开发详情页(位于B分支,虽然已经开发了一部分),转战系统消息功能的开发。当系统消息功能开发完成之后,就需要考虑将系统消息功能(位于B分支)和列表功能(位于A分支)放在一个分支上提测(开发一部分的详情页功能暂先不需要合并)的问题,这时候 分支合并 就要派上用场了。 分支合并 说起 分支合并 ,大家第一个想到的命令肯定是 git merge ,因为这是 分支合并 的常用命令。 使用 git merge 合并分支会将两个分支的 所有内容 进行比较合并,因此我们如果想合并两个分支中的 一部分

Branch target prediction in conjunction with branch prediction?

落爺英雄遲暮 提交于 2019-11-30 01:42:07
EDIT: My confusion arises because surely by predicting which branch is taken, you are effectively doing the target prediction too?? This question is intrinsically linked to my first question on the topic: branch prediction vs branch target prediction Looking at the accepted answer: Unconditional branch, fixed target Infinite loop goto statement break or continue statement End of the 'then' clause of an if/else statement (to jump past the else clause) Non-virtual function call Unconditional branch, variable target Returning from a function Virtual function call Function pointer call switch

Retroactive named branching in Mercurial

≡放荡痞女 提交于 2019-11-30 01:17:30
问题 Is there a way to associate a bunch of Mercurial changesets with a named branch after they have been committed, i.e. retroactively ? 回答1: I just wanted to do this, and here’s the solution I found. A year has passed since the question was originally asked, this might explain why I can now find a solution. It has the disadvantage that you create an extra revision in the process, but this wasn’t too bad for me. First, you go back to where you want to create the branch. In my case, I actually

Git Stash – Temporarily Stashing Your Work

岁酱吖の 提交于 2019-11-30 01:04:14
Git Stash – Temporarily Stashing Your Work Commands discussed in this section: git stash Git Stash – Stashing your work So there you are, working on a new feature, modifying files in the working directory and/or index and you find out you need to fix a bug on a different branch. You can’t just switch to a different branch and lose all your work. git stash to the rescue! git stash : 1) Saves your working directory and index to a safe place. and 2) Restores your working directory and index to the most recent commit. You can then work on other branches, make commits, etc. and when you’re ready to

Git Stash – Temporarily Stashing Your Work

情到浓时终转凉″ 提交于 2019-11-30 00:56:38
Git Stash – Temporarily Stashing Your Work Commands discussed in this section: git stash Git Stash – Stashing your work So there you are, working on a new feature, modifying files in the working directory and/or index and you find out you need to fix a bug on a different branch. You can’t just switch to a different branch and lose all your work. git stash to the rescue! git stash : 1) Saves your working directory and index to a safe place. and 2) Restores your working directory and index to the most recent commit. You can then work on other branches, make commits, etc. and when you’re ready to

GitHub: What is a “wip” branch?

◇◆丶佛笑我妖孽 提交于 2019-11-30 00:12:32
When I was browsing GitHub repositories I quite often saw "wip" branches (e.g. 3.1.0-wip ). What does "wip" mean? I couldn't find the answer anywhere - neither on Google nor on GitHub:help. Conventionally, "wip" stands for "work in progress". On GitHub, pull requests are prefixed by [WIP] to indicate that the pull requestor has not yet finished his work on the code (thus, w ork i n p rogress), but looks for have some initial feedback ( early-pull strategy ), and wants to use the continuous integration infrastructure of the project. For instance, TravisCI , CodeCov , and codacy . More

What's the right way to branch with Visual Source Safe?

谁都会走 提交于 2019-11-30 00:09:03
问题 What I currently do is I link the project to another location and give it the same name, then check the box where it says "Branch after share." And then I would Check out the shared project and work off it. And finally merge with the original project. This works okay, but it feels very clunky: I have multiple instances of the project on my drive; I have to change physical address of the website (i use asp.net 1.1) every time I work on a different branch; That doesn't feel like the right way

Where did I branch from?

六月ゝ 毕业季﹏ 提交于 2019-11-30 00:06:31
问题 I got back on an old project and I ran the nice git status to figure out what was going on and I noticed way too many branches! I want to do some housekeeping before starting to work on this again but I'm not sure which branch comes from which.. E.G. Does "branchA" derive from "develop"? Does "branchB" derive from "master" or "branchA"?? How can I answer the sample questions above? 回答1: There's no canonical answer for this, since branches are simply pointers to certain commits in a DAG. For

Git常用命令小结

一曲冷凌霜 提交于 2019-11-29 23:57:52
平时我们经常使用到git,有些朋友喜欢使用git的窗口界面来操作,我个人也蛮喜欢的。不过git命令是学习git的根本,和机器打交道最近的方式,所以学好git对理解git的工作流是很有帮助的。下面梳理一下本人常用的git操作命令。 git提交操作流程 (进入到项目目录中,然后执行如下命令) #初始化本地仓库 git init #将本地内容添加至git索引中 (注意:每次提交最好都执行一下) git add . (git add --all) #将索引添加至本地仓库中(日志log,注意新增文件内容需要该命令才能提交到本地仓库,才能push到远程) git commit -m "first commit" 注意:日志不能为空字符串等 #添加远程仓库路径 git remote add origin ssh://git@git.infinitus.com.cn:7999/han/gittestdemo.git #将本地内容push至远程仓库中 git push -u origin master (push之前,确保公钥已经放上去了) 子分支与主分支master合并流程 1.首先我们在子分支上开发,完成后提交代码到子分支 git add . git commit -m ‘dev' git push -u origin dev 2.把分支的代码合并到主分支master上 步骤一览