1

How to do I update a feature branch if its parent development branch has some updates by teammates that are relevant to the code being developed in the feature branch? I am new to Git and would appreciate the assistance.

Filburt
  • 17,626
  • 12
  • 64
  • 115
alaboudi
  • 3,187
  • 4
  • 29
  • 47
  • Possible duplicate of [git pull from master into the development branch](http://stackoverflow.com/questions/20101994/git-pull-from-master-into-the-development-branch) – msw Feb 29 '16 at 14:54

1 Answers1

1
git pull --rebase <teammates_branch> <your_local_branch_name>
DonCallisto
  • 29,419
  • 9
  • 72
  • 100
  • So from what I understanding what I need is this 'git rebase' business. It is as though I have only just branched off of my development branch right? – alaboudi Feb 29 '16 at 15:02
  • 1
    @alaboudi if your feature was branched BEFORE those commits, you need to re-integrate them into your branch. You can do by merging them (only git pull) or rebasing it. Rebase keeps history linear as it will apply your commits ON TOP of the history, like them are happened AFTER your teammates commits (logs will always display correct date however). You could run into several conflicts however: if so, you need to resolve them manually, add conflicts-free files to stage and rebase --continue. – DonCallisto Feb 29 '16 at 15:14
  • great answer @DonCallisto. Thank you very much for this – alaboudi Feb 29 '16 at 17:30