branch

Is using “feature branches” compatible with refactoring?

一个人想着一个人 提交于 2019-12-02 21:29:13
“ feature branches ” is when each feature is developed in its own branch and only merged into the main line when it has been tested and is ready to ship. This allows the product owner to choose the features that go into a given shipment and to “park” feature that are part written if more important work comes in (e.g. a customer phones up the MD to complain). “ refactoring ” is transforming the code to improve its design so as to reduce to cost of change. Without doing this continually you tend to get uglier code bases which is more difficult to write tests for. In real life there are always

How to handle merges with hgsubversion?

自闭症网瘾萝莉.ら 提交于 2019-12-02 21:15:30
I am trying to contribute to a project that uses Subversion. I used Mercurial and its hgsubversion extension to clone the repo. My work takes place on a feature branch. How do I keep the feature branch up to date with stuff that happens on the default branch (hg speak) aka the trunk (svn speak)? So I used hg up feature to update to the feature branch, then hg pull which gave me changesets on the default branch. So I did hg merge default , the committed the merge, then tried hg push to send my changesets to Subversion. And Mercurial said: "Sorry, can't find svn parent of a merge revision." I

git: Merge Branches but Keep Commit History

佐手、 提交于 2019-12-02 20:49:36
In my git workflow we have one main repository and one branch, master. Everyone pulls from remote master and everyone pushes to remote master. I want to work in my own branch while I prepare a feature. So far my history is something like this: git pull --rebase git checkout -b new_feature <make some commits> git checkout master git pull --rebase Now I want to merge the branch and here's what I need: No merge commits in my local master branch. All commits made into my new_feature branch merged into master as if I had made them in master. All merged commits to be merged somewhere on top of my

git — locking master branch for some users?

耗尽温柔 提交于 2019-12-02 20:39:27
I would like to force other team-members to not work on the master-branch but on a development branch. we have a central git-repository where we push our work into. i would like to know if it's possible to block users from pushing changes to the master-branch but only allow certain users to do so. I would like to have the following "workflow" development is always only done with a development-branch the release-manager is responsible for the master branch and only he is allowed to merge stuff from a development branch into the master and push it to the master-branch on the central repository

Git branch has diverged after rebase, so why rebase?

拜拜、爱过 提交于 2019-12-02 20:34:54
Recently I came across the notification that my branch has diverged. That was when I made a feature branch, pushed it to remote, and did a rebase with master a few days later when I started working on it again. git checkout -b feature-branch git push origin feature-branch:feature-branch ...and when in master... git pull origin master git checkout feature-branch git rebase master But when I want to push my branch again, it says: On branch feature-branch Your branch and 'origin/feature-branch' have diverged, and have 67 and 1 different commit each, respectively. I found this answer in " Git

How to 'fix' a SVN branch/tree conflict?

烈酒焚心 提交于 2019-12-02 20:32:22
I took over a software project and decided to put everything under SVN (on Assembla ) using Tortoise SVN. The trunk is under ROOT. So the trunk contained the whole application (which I tagged 1.0). For my first big feature I created a feature branch named "dev". I could merge changes in the trunk branch into the dev branch without problem (as I was doing small bug fixes). Once my feature was complete, I did a merge back into the trunk branch. Everything was working fin up to this point. The new code under ROOT showed the new feature properly. But then I did a commit (of the result of the merge

How can I find out which files have been modified in a branch?

主宰稳场 提交于 2019-12-02 20:16:41
I have two branches: master and bug1. I checked out bug1, did bunch of changes and multiple commits. How do I get a list of all files that were changed on the branch? I'm not interested in hashes, dates or any other commit related details. I just want to get a simple list of touched files. git diff --name-only master bug1 Tim Henigan From your master: git diff --name-status BRANCH See the git diff man page for details. 来源: https://stackoverflow.com/questions/1749323/how-can-i-find-out-which-files-have-been-modified-in-a-branch

How do I configure Git to automatically pull from current branch when using “git pull”?

允我心安 提交于 2019-12-02 20:11:01
With our current setup you always have to enter the branch name (ie: git pull origin feature-branch " when doing a pull. I've already made the mistake of pulling from one branch into another, accidentally merging two branches with two very different releases. I'd like to avoid this by configuring Git so that simply typing git pull will pull the current branch you're in. How do I do this? Karthik Ramachandran You can create a tracking branch. From the Git Book ( http://git-scm.com/book/en/Git-Branching-Remote-Branches ): When you clone a repository, it generally automatically creates a master

creating git branch after the fact?

馋奶兔 提交于 2019-12-02 20:04:32
I suspect the answer to my problem is fairly simple, but I'm a git newbie and my head is getting confused at reading answers to all the similar SoF questions that don't seem to be quite my problem. Here's my problem: I have a repo at github with a single branch ('master') that I've been working on in my local repo. At some point I stopped pushing commits back up to master on github because I was worried that they'd break things. So now I have lots of commits in my local repo that I want to push back up to github. However, rather than pushing back up to master I would prefer to create a new

What is the optimal range for number of live branches? [closed]

﹥>﹥吖頭↗ 提交于 2019-12-02 19:36:46
Let's say a project is: 1 product built over Y years comprising M modules written in L [1..3] languages developed by total of D developers At what point does a project contain too many or too few live branches? I know it is a hard question, it is even harder to answer numerically, I am however looking for quantified answers, if at all possible, please make a formula. Background If there are too few branches, code is never ready, developers don't make large changes because it may be impossible to meet next deadline. Likewise product managers never feel confident enough to name something a