branch

Git commit hooks per branch

末鹿安然 提交于 2019-11-28 19:23:08
I'm working on getting into some more advanced usage of git, and I think hooks are the way that I want to go, perhaps somebody can give me some advice here. My plan is to have a git repository with 3 branches (development, staging, and production). I want commits to each of these 3 branches to trigger a different script post-commit. Does git have the capability to do this or am I barking up the wrong tree? Thanks in advance. in a post-commit hook you could do the following: if [ `git rev-parse --abbrev-ref HEAD` == "development" ]; then echo "development-script" elif [ `git rev-parse --abbrev

TFS 2010: How to produce a changelog (ie. list of work items) between two releases of the application using labels?

百般思念 提交于 2019-11-28 19:23:04
问题 I'm looking for a way to automatically produce a changelog (actually a list of workitems) between two releases of my application. I have two versions of my application, v1 and v2, each is identified by a label in TFS 2010 (LABEL1 and LABEL2) that I manually created before building the setups of my app. I have a branching system, which means I have a trunk were most of bugs are fixed, and a branch where patches are applied mostly using merges from the trunk (but there are also some fixes on

Git: move a commit “on top”

丶灬走出姿态 提交于 2019-11-28 19:16:23
Let's say in master I have a feature disabled. I work on that feature on branch feature , so I have a special commit $ there that just enables that feature. Now I want to merge the changes I did in feature into master , but keep the enabling commit out. So it's like main: A--B--X--Y feature: A--B--$--C--D So let's say I want to do it, by moving the $ commit on top of feature: new feature: A--B--C--D--$ How would I go about doing that? git rebase -i B , and then move $ to the end of the list that shows up in your editor. It will start out as the first line in the file that opens. You could also

What branching strategy should I use during the development/maintenance of a web application?

故事扮演 提交于 2019-11-28 18:56:57
I am trying to decide on the best branching strategy for a web application project. Here is what I have come up with until now and I would greatly appreciate any comments and experiences. The way I see it there are two main branching strategies: "branch by release" and "branch by feature". "Branch by release" : Development takes place on the trunk. When the time for a release is near, a branch is made for that release. This branch is then stabilized/tested and finally a release is made. After the release, the branch is merged back into the trunk, while keeping the release branch alive for bug

How do you handle the tension between refactoring and the need for merging?

旧街凉风 提交于 2019-11-28 18:46:57
Our policy when delivering a new version is to create a branch in our VCS and handle it to our QA team. When the latter gives the green light, we tag and release our product. The branch is kept to receive (only) bug fixes so that we can create technical releases. Those bug fixes are subsequently merged on the trunk. During this time, the trunk sees the main development work, and is potentially subject to refactoring changes. The issue is that there is a tension between the need to have a stable trunk (so that the merge of bug fixes succeed -- it usually can't if the code has been e.g.

git-svn branching

心不动则不痛 提交于 2019-11-28 18:40:08
I am using git with an svn repository everything is going fine I did all my branching with git so I did not branch on svn but I branched with git and pushed those branches to a separate location. Then I commited changes from the branch when needed. But now I want to create some branches that actually exist on svn I tried: $ git svn branch someFeature -m "message" ,and I got this: $ git svn branch someFeature -m "message" Multiple branch paths defined for Subversion repository. You must specify where you want to create the branch with the --destination argument. How should I specify the

Configure TeamCity to build from SVN trunk, branches and/or tags

六月ゝ 毕业季﹏ 提交于 2019-11-28 18:40:05
问题 How can I configure TeamCity to build from SVN trunk and also from different branches and/or tags ? Our idea is to have multiple builds from the same project, this way we can have the current version that is in production (with the ability to make deploys and fixes over that "release tag") and at the same time have the trunk and branches with the actual development that is taking place daily. We have our policies, owner and all that for our SVN directories, the problem that we have is how to

Mercurial clone from a branch

时光总嘲笑我的痴心妄想 提交于 2019-11-28 18:21:27
问题 We have a repository with three named branches, I wanted to clone one of the branches. Is there a mercurial command to do that? If I provide the path (of branch) with hg clone I get 404 error. 回答1: hg clone http://your/repo -r branchname should do the trick. 回答2: Benjamin's right. But is that really what you want to do? In particular, you'll only get the changesets needed to make up that branch, and nothing else - and that would, for example, prevent you from pulling changesets in from the

How to branch and merge in TFS

两盒软妹~` 提交于 2019-11-28 18:19:08
This question is a derivative of a previous question: How to version resources that are shared across projects I have a project that contains code that is consumed by many other projects. Specifically, one folder in this parent project has been branched to dependent child projects. We have since made changes in the parent project and checked them in. In Source Control Explorer, I right click on the branched folder in the parent project and select "Merge", intending to push the changes to a dependent project. I select the child project as a destination and then select "Latest Version". The

Git branches with completely different content

眉间皱痕 提交于 2019-11-28 18:14:19
Since Git has the ability to keep track (and keep it clean) of branches with completely different content from each other, in the same repository, some projects (like Git itself) have started to make use of it. Git, for instance, uses one branch for the code itself, while keeping its documentation in a separate branch. Same repo, just different branches. It might just be me, coming from a SVN background, but I find it confusing to have 'nothing in common' in those branches. Development/staging/production branches; those I understand. Branches for incomplete features; sure, I'm doing those too.