I see many questions like that, but unfortunately none of them is giving a straight answer - can git track the base branch from which the current branch was created?
Consider the following branch structure:
master ---c0--c1---
\
release1 ---c2--c3
\
feature1 ---?
Release1 branch was branched off master and had 2 commits since merging (c2 and c3). Master branch had 1 commit (c1) which had not been merged anywhere. Feature1 branch was branched off release1 after c2 commit and does not have c1 or c3 commits yet.
I want feature1 to be "tethered" to release1, i.e. it should get updates from release1, but not from master, so "git ..." command should merge c3 commit but not c1.
This is easily done when user EXPLICITLY specifies release1 as the source branch when doing a merge. My question is - is git able to MEMORIZE that current branch was based off release1 and pull changes from release1 BY DEFAULT?