Daydreaming Duck
Daydreaming Duck

Reputation: 2270

Config default Git branch name

I'm working with a repo which has a specific 'folder' structure. I must create features in branches named feature/myBranchName, fix bugs in branches named bugfix/myBranchName etc.

So, the question: Can I somehow specify a default branch name using SourceTree or git itself? I want to mask every new branch name like feature/*

Ok, let's explain more clearly:

  1. I'm opening SourceTree.
  2. I'm pushing the button 'branch'.
  3. In the branch window I have a textfield where I specify the branch name.
  4. I want masked input in this textfield with mask topic/* or something like that.

Upvotes: 2

Views: 2240

Answers (1)

nwinkler
nwinkler

Reputation: 54437

This is possible using the Git-flow branching model, both from command line and also through SourceTree.

Once you have installed the Git-flow command line tools, you can simply call

git flow init

in your local repository and it will allow you to define the branch names you have mentioned.

You can do the same in SourceTree by pressing the "Git Flow" button in the toolbar:

SourceTree

More details here

Upvotes: 3

Related Questions