Questions tagged [branch]

A "branch" is a term used in version control systems to represent an independent line of development. Depending on the system, a repository can contain one or more branches. Branches are merged when changes need to propagate from one branch into another.

A "branch" is a term used in version control systems to represent an independent line of development. Depending on the system, a repository can contain one or more branches. Branches are merged when changes need to propagate from one branch into another.

Source: Wikipedia Branch (Version Control)

Related tags:

5403 questions
81
votes
7 answers

Different default remote (tracking branch) for git pull and git push

Is there a way to set up a git repository, so that git pull defaults to one remote and git push defaults to another? I know I can set both by changing the value of the remote variable in branch section of .git/config, but how to do it for each…
svick
  • 236,525
  • 50
  • 385
  • 514
80
votes
2 answers

How to delete a branch in the remote repository using EGIT?

How to delete the remote branch itself in sourceforge with all files in it, using egit ?
Ismail Marmoush
  • 13,140
  • 25
  • 80
  • 114
80
votes
3 answers

Svn switch from trunk to branch

I am in the root folder of an SVN-hosted project's trunk and am exploring setting up two branches. One branch will be a "snapshot" of the project at the current (stable) revision, and a second branch will be one I'll work on to apply some new code,…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
80
votes
1 answer

What is the simplest way to do branching and merging using TortoiseSVN?

What is a really simple "how to" to do branching and merging using TortoiseSVN?
JoelFan
  • 37,465
  • 35
  • 132
  • 205
80
votes
4 answers

Subversion: Can I checkout, modify, and then make it a branch?

I did a checkout from my trunk to a local DIR and made lots of local changes there. Now I don't want to commit it back to the trunk, but I'd rather make a branch from this local version. Is that possible? Can I just copy the trunk to a branch, and…
Frank
  • 64,140
  • 93
  • 237
  • 324
79
votes
2 answers

Why is there a `remotes/origin/HEAD -> origin/master` entry in my `git branch -l -a` output?

I don't understand the second line in the output to git branch -l -a: remotes/origin/HEAD -> origin/master. git branch -l -a * master remotes/origin/HEAD -> origin/master remotes/origin/master Is that a leftover from another operation? Should I…
mistaecko
  • 2,675
  • 1
  • 20
  • 18
77
votes
5 answers

Backing Out a backwards merge on Mercurial

How do you reverse the effect of a merge on polarised branches without dying of agony? This problem has been plaguing me for months and I have finally given up. You have 1 Repository, with 2 Named Branches. A and B. Changes that occur to A will…
Kent Fredric
  • 56,416
  • 14
  • 107
  • 150
76
votes
4 answers

Is it possible to 'fork a fork' in Github?

I am currently working on a project that is a spinoff (fork) from a framework I have been working on. This project is intended to be pretty generic, but now I need to fork the codebase again for a client of mine. At this moment, I have created a…
Aron Rotteveel
  • 81,193
  • 17
  • 104
  • 128
75
votes
1 answer

TFS: submit changes done locally in one branch to another branch

I made changes to a lot of files, and in the meantime I figured I rather commit this untested code to a yet-to-be-created branch, so that users of the existing code base are not affected. As I touched really many, many files and created and added…
Evgeniy Berezovsky
  • 18,571
  • 13
  • 82
  • 156
74
votes
3 answers

best practices in mercurial: branch vs. clone, and partial merges?

...so I've gotten used to the simple stuff with Mercurial (add, commit, diff) and found out about the .hgignore file (yay!) and have gotten the hang of creating and switching between branches (branch, update -C). I have two major questions…
Jason S
  • 184,598
  • 164
  • 608
  • 970
74
votes
4 answers

In Git, list names of branches with unpushed commits

Given a project with several local branches, each tracking some remote branch, is there a command that lists all branches that have unpushed commits? (That is, even if none of those branches are checked out.) I don't want to see the commits…
detly
  • 29,332
  • 18
  • 93
  • 152
73
votes
12 answers

Branching Strategies

The company I work for is starting to have issues with their current branching model and I was wondering what different kinds of branching strategies the community has been exposed to? Are there any good ones for different situations? What does…
Craig H
  • 7,949
  • 16
  • 49
  • 61
72
votes
2 answers

Git: List git branches, sort by (and show) date

How can I list git branches showing and sorting by their last commits' dates? I've found this: for k in `git branch | sed s/^..//`; do echo -e `git log -1 --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" "$k"`\\t"$k"; done | sort -r I'd expect…
Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
72
votes
15 answers

Dynamically Fill Jenkins Choice Parameter With Git Branches In a Specified Repo

I have a parameterized Jenkins job which requires the input of a specific Git branch in a specific Git repo. Currently this parameter is a string parameter. Is there any way to make this parameter a choice parameter and dynamically fill the drop…
mkez00
  • 982
  • 1
  • 8
  • 17
71
votes
4 answers

How can I merge a branch into master but continue working on the branch?

I created a branch to try a different approach and it worked, so I would like to merge the "Farmcrops" branch into "Master" to keep those changes but continue the "Farmcrops" branch to explore another possibility. That way, if this latest change…
jgravois
  • 2,559
  • 8
  • 44
  • 65