Questions tagged [git-branch-sculpting]

Sculpting Git branches into various shapes and trees is an art. This tag is for all questions that involve sculpting and pruning commit trees into different forms.

The keys to understanding how to sculpt Git branches are the following:

  1. Git is just a tree of commits, with bookmarks (or Post-it notes) attached:

    Git repo diagram explaining branch relationships

  2. The final state of a series of commits can be made to be equivalent to squashing (rebasing) or merging those commits.

21 questions
0
votes
1 answer

Why does branch B have conflicts in all merge commits from A to B after the first merge commit?

I have a primary development branch (A) which has a long history. All release commits in A are tagged as such. I checked out the root commit of A, and branched into test (B). So I have a primary branch A, and the head of branch B pointing at the…
0
votes
1 answer

How does one move a file erroneously added to a branch / commit to a different branch / commit in Git?

I have a file (driver_06_05_2015.view) in branch ServiceProvisionSpecialist_06_08_2015 that shouldn't be there and was mistakenly committed to that branch even though it should be in the driver_06_05_2015 branch. Is there a way I can move just the…
leeand00
  • 25,510
  • 39
  • 140
  • 297
0
votes
1 answer

Git branch from old commits

I've researched this on SO and other documentation. I've tried rebasing, merging, cherry-picking, and detached heads. After literally 6 hours of trying to do this, it's time to ask the question! Here's what I'm starting with: A-B-C-D-E-F-G…
russellr
  • 58
  • 1
  • 8
0
votes
1 answer

How to design and maintain multiple live code stream on single git repository

I have a project with two live versions (new version is not backward compatible therefore two completely separate code stream). Question: how should I design git (looking for best practice): 1) Have two separate Master and Develop branches for both…
user3784080
  • 97
  • 2
  • 13
0
votes
1 answer

When using a feature-branch based rebase workflow, how can I keep a branch for minor changes in the master?

I used to use a merge workflow and my current team works with a rebase workflow. In it, features branches are forked from the master, then rebased with the master and then squash merged onto the master. I would like to keep a branch for minor…
Pedro Rolo
  • 28,273
  • 12
  • 60
  • 94
-1
votes
1 answer

How can I create a new git branch from the base of the commit tree , which has no commit in common with master branch ? for gh-pages

I want to make a new branch from the base of the master branch, such that the new branch has no commit the same as the master branch. the new branch will be totally different from the master branch, and never to be merged to master I want to do…
aahnik
  • 1,661
  • 1
  • 11
  • 29
1
2