branch

Difference between a branch, fork and clone in git?

Can someone help me understand the difference between a branch, a fork and a clone in Git? ...

Release fixes with only some changes from CVS trunk without using branches.

I have this kind of situation: CVS trunk - all changes, stable ad unstable, are made to trunk. production - major releases are made creating tags on CVS, but minor fixes are made manually, merging only the requested changes from trunk. I'm not allowed to use branches, so I need an alternative solution to simplify or automate the proce...

Branch from *part* of main code, how to keep it up to date?

Was little bit difficult to formulate the title for my question since is kind of abstract... Let me try to explain. I have a main code which has a git repository, I decided to take part of that code and make it a stand alone app. with its own name and versions to be distributed. Is there a way to keep the main code and that other branc...

svn branching and tagging best practices

I have a project for which I am ready to create a branch, which will be branch 1.0.x for all of the 1.0.x changes. I also want to have a set of tags to correspond to changes to that branch, i.e. 1.0.1, 1.0.2, etc. When I first create this 1.0.x branch, I am also creating a tag named 1.0. At this point, the branch and the tag have the sam...

Is there a good practice to make a branch of a subdirectory of "trunk" ?

I have a project, that contains many parts. I'm going to make a branch for only a subpart of the project, rather the entire project. Is there a good practice to do so ? Or, i should branch the entire "trunk", to avoid some problems ? The only problem, i see, is a confusion about - what part of the project was actually branched. Becaus...

Comare and Edit Branches in Git with a Mergetool

I have 2 branches that I can compare/diff using my difftool (Beyond Compare). However, the files used for the diff are temporary copies and not the actual files from the current branch. This means that if I want to make a change to an existing file, I cannot do it via the difftool. I would need to make a copy of the files of one branch, ...

Locking a SubVersion branch in the days before a release

In the days before a release we'd like to be able to prevent developers from committing files to the SubVersion branch, unless a team leader has reviewed and approved the changes (in which case they would make a temporary change to allow this). Previously we used ClearCase, in which this was relatively easy to do. Since the svn:lock co...

How do I make a copy of a branch for testing rebase?

I've done this before by creating a clone and doing the rebase in the clone, but I suspect I could do it safely on a separate branch. I have a feature branch feat-x with about 25 commits on it. I'd like to (safely) squash several of these together. (I say "safely" because the first couple of times I squashed I didn't get it right -- bu...

Getting Beyond Compare to Diff 2 Branches Simultaneously

>>git difftool branch1 branch2 opens my difftool (Beyond Compare:BC) with every file that has a diff between the branches. I have to close BC after each file just for it to reopen with the next file. BC can diff whole directories and multiple files. Is there a way to get git difftool to open all files simultaneously, or diff the whole...

Pretty hg branch graphs

With hg, how I can see in command line the branches graphs? Similar to git log --pretty=oneline --graph ...

optimization, branching elimination

float mixValue = ... //in range -1.0f to 1.0f for(... ; ... ; ... ) //long loop { float inputLevel = ... //in range -1.0f to 1.0f if(inputLevel < 0.0 && mixValue < 0.0) { mixValue = (mixValue + inputLevel) + (mixValue*inputLevel); } else { mixValue = (mixValue + inputLevel) - (mixValue*inputLevel)...

Good way to limit merge cost for feature Branches in SVN

Can anyone recommend workflow/use patterns that reduce the cost/complexity of merges when using Agile with SVN? I know that use-git is an answer, but I'm trying to figure out how to solve my problems process wise where I am before throwing a new tool into the mix because I don't have the cycles to handle the disruption at present. We...

Need help with SVN: Trunk/Branches/Tags structure

We are currently using SVN without Trunk/Branches/Tags structure. So far we were good with it but now, we have reached a level where we need some kind of system which can handle 3 different level of versions for 3 different servers. Currently this is what we have been doing: All the files in a single repository, once the work is done,...

When is the right time to delete a git feature branch?

I don't want to end up with 82 feature branches hanging around, so I'm wondering what the potential drawbacks are to simply deleting the feature branch as soon as I merge it to master. Workflow: git co -b feat-xyz hack hack git ci hack some more git ci git co master git merge feat-xyz smoke test git br -d feat-xyz Any issues here? ...

"if" versus "switch"

Possible Duplicate: is else if faster than switch() case ? I've encountered a lot of situations lately where I have very simple conditionals and need to branch application flow. The "simplest" means of accomplishing what I'm doing is just a plain old if/elseif statement: if($value == "foo") { // ... } elseif($value == "ba...

TFS Branch-Per-Feature Strategy That Fits Multiple Environments With Independent Feature Timetables

There are several/many questions regarding TFS branching strategy, but I am haven't been able to come up with a strategy that fits with my scenario. My TFS project consists of a single solution that contains a Web Project, a Business Layer Project, and a Data Layer Project. The project is a portal of reports. Reports are largely isola...

How to prevent a file from automatically merging when switching branches in Mercurial?

Let's say I have two branches named default and newfeature. I have a file called readme.txt in both branches. I'm working on the newfeature branch and I make a change to readme.txt. If I run hg up default without committing the change, Mercurial automatically merges the version of readme.txt in newfeature directly into default. How can ...

Locking a mercurial branch before release

How do I lock the entire branch of a mercurial? I get this requirements normally before the release... ...

Using git-svn to make remote branches

I'm trying to make a branch on the remote subversion server, using git-svn. I've made a git branch (namespacing) but when I tried to git svn dcommit it just wrote to trunk! After cleaning that up I'd like to know how to make a branch on the remote, and then how to commit to that. ...

how to view/edit a git remote branch

Hi I'm completely new to git, but I have experience with SVN. All the tutorials assume that one knows how to view/edit a file when using git, but I'm confused. I cloned a repository (from someone who needed to share code with me), then checked out several remote branches to local branches. Now I want view the code (it's Java). I can't fi...