branch

How do I access svn branches using git-svn with a non-standard svn repo layout?

拈花ヽ惹草 提交于 2019-12-10 16:38:40
问题 The standard repo layout in svn is as follows. /trunk /branches featureX featureY /tags 1.0 2.0 The repository I'm working with is a much flatter structure. trunk featureX featureY Essentially, trunk is at the same level as the other branches. I can't use the -s or -b option with git svn init because of this. How would I pull in trunk as the git branch master and pull in featureX as a git branch of the same name? I don't care about any other branches or tags. I've seen similar questions and

学习 Git Rebase

自作多情 提交于 2019-12-10 15:39:20
有问题为什么不问问神奇的 man 呢? rebase 也算是我比较常用的一个指令了,但是很长时间以来,对这个指令的认识还是不够深刻,于是就找了个时间认真地读了一下 git rebase 的文档。这份文档不需要在网络上查找,在自己的电脑上直接使用 man git-rebase 就可以查看了。在这份文档中,被提到的几个重要的 rebase 参数就是 newbase 、 upstream 、 branch 。除此之外, -i 也是一个能够极大的提升使用体验的选项,允许我们交互式的选取需要操作的提交。 git rebase [-i | --interactive] [<options>] [--exec <cmd>] [--onto <newbase>] [<upstream> [<branch>]] 三个参数 在执行 git rebase 的之前,如果我们指定了 branch 这个参数,那么 git 会在开始 rebase 操作之前签出到 branch 。 接着,git 会把所有在当前分支但不在 upstream 分支的提交保存到一个临时区域。如果想要在 rebase 开始之前了解哪些提交会被移到临时区域,可以使用 git log <upstream>..<branch> 查看。 然后,如果我们设置了 newbase ,那么 git 会把当前分支重置到 newbase ,否则,就重置到

How to create branch on TFS with attaching pending changes to new branch

白昼怎懂夜的黑 提交于 2019-12-10 15:30:06
问题 I was working on main branch and I have done a lot of changes to files. I did not check in those changes. How to create child branch from main, but all local pending changes which are attached to main branch, changes to be attached to newly created child branch. So basically: How to create child branch with attaching all pending changes of parent branch to child branch? 回答1: You can shelve your changes, then use the TFS Power Tools to unshelve them into a different branch. This is a specific

Showing git branch in shell prompt?

北城余情 提交于 2019-12-10 15:26:18
问题 I am trying to get my shell prompt to display the current git branch name. I have read a few tutorials and blog posts etc. and as far as I understand I'm doing everything correctly but it doesn't seem to be working. I would like the prompt to look like this: dannys-macbook:hillcrest-store [master]$ but currently it looks like this: dannys-macbook:hillcrest-store danny$ I have added the following to ~/.bash_profile: PATH=$PATH:/usr/local/bin; export PATH COLOR1="\[\e[1;32m\]" COLOR2='\[\e[1;1m

Git only allow merge from development into master

两盒软妹~` 提交于 2019-12-10 14:36:08
问题 I'd like be able to setup our branches so that merges can only go into master from the development branch. I understand that perhaps this sounds draconian and I should to ask myself the question, do i not trust the developers on the team... For the time being I don't because they're just becoming familiar with Git. In time I'll remove the restriction but until then this would be a useful. Is it possible? Thanks, Mark. 回答1: As kowsky answered, it's possible to do this in a server-side pre

Find the tfs path of merged branch

删除回忆录丶 提交于 2019-12-10 14:35:50
问题 Using TFS, I have trunk $/project/trunk and a branch $/project/dev/feature/new_one . I have merged my branch back to trunk as follows: C33($/project/trunk) | \ | \ | C32($/project/dev/feature/new_one) | | | | | | ... I use the TFS API and can find the merge changeset C33. With the method QueryMerges() , I'm able to find the parent changeset C32 with all the changes on the files, but not the information I need :( Is there a way, using the TFS API, to find the repository path of the branch

How to handle dependencies when using git topic branch workflow?

柔情痞子 提交于 2019-12-10 14:11:31
问题 In our project we try to stay close to the "official" git workflow as it is suggested here: http://www.kernel.org/pub/software/scm/git/docs/gitworkflows.html We use a master and next branch, start our topic branches off from master , regularly do test integration into next , and if a branch is complete, we merge it into master . Now sometimes it happens, that there's some development on topic-X . A developer creates somefile.c and adds code there that he needs for his topic. After a while

mercurial log of changests on merged named branches, but not unmerged

谁说胖子不能爱 提交于 2019-12-10 14:02:13
问题 I want to be able to get a "hg log" of every changeset that appears in the graph between changeset1 and changeset2. I cannot find a way to do it without either a) omitting nodes on named branches that ARE merged between changeset1:changset2 or b) including nodes on named branches that ARE NOT ancestors of changeset2 Here's a "hg glog" of a simple example with 2 named branches plus the default branch. One named branch gets merged and so its nodes are relevant, the other is irrelevant: @

How do I fetch/clone only a few branches using git-svn?

喜欢而已 提交于 2019-12-10 13:59:46
问题 The SVN repository that I am working with has a rather large number of branches. I am only interested in working with three of them and maybe another new SVN branch that will be created in the future. What I have figured out so far is that the command git svn clone URL -T trunk -b branches -t tags will clone all SVN branches and subsequent git svn fetch commands will also operate on all SVN branches. Is there a way for me to specify the few branches that I want to work with? I most likely don

Always ignore a certain commit on merge in git

社会主义新天地 提交于 2019-12-10 13:55:49
问题 I am working on my first project using git and have ran into an issue. The repo contains a a client/server app. I have a 'master' and 'test' branches, with the intent that master is always the same as what's deployed. My problem there are 3-4 places in the codebase where the server URL is stored. I want to change this in the 'test' branch, but not in the 'master' branch. The problem is, of course, that whenever I want to merge back to 'master', git wants to put this change in 'master'. I can