Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Variable Substitutions in Code

Daniel Huff September 14, 2015

I am trying to figure out a way to create variables on my master that can be changed when merged with branches. Here is an example: I have a Master, BranchA and SecondBranch. The code in Master is the same in the other two branches except for a few lines. Those lines are specific to each branch. The way I have it set up right now I have to pull Master locally, make the branch specific changes, then push it out to the correct branch. What I would like to do;

Make changes to Master without searching for the branch specific code,

Merge Master with BranchA and have that code automatically changed.

 

I know I sound lazy but being able to do this would save me about an hour a day of searching and changing, this doesn't count the time fixing something I may have missed. And since I have been working with Git for just over a week, missing something can be a pain. 

Thanks in advance.

1 answer

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2015

I am fairly confident that what you're asking for is not a feature of Git (so also would not be a feature of Bitbucket or Sourcetree).

To be certain, you might pose the question in a forum or QA site dedicated to Git power users, which I admittedly am not.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events