we have a branch named ARC-0000
and you've done some work on it (3 commits)
git log --oneline
a4c0d8f ARC-0000 - finished refactoring the thing
d54ae91 ARC-0000 - wip - started refactoring a super important thing
f0b1ed4 ARC-0000 - made some changes
5bb3d18 Merge pull request #535 from wapopartners/ARC-1546* the base commit is 5bb3d18
meanwhile commits have been made to origin/master
branches have diverged
need to sync with origin/master again
git log --oneline
1d2b99f Merge pull request #540 from wapopartners/ARC-1502
62679d9 Merge pull request #536 from wapopartners/ARC-1501
5bb3d18 Merge pull request #535 from wapopartners/ARC-1546* the base commit NOW is 1d2b99f
use rebase to reply all commits on ARC-0000 after the latest commit from origin/master
git rebase origin/master
# things happen
git log --oneline
97324cf ARC-0000 - finished refactoring the thing
bdedb9e ARC-0000 - wip - started refactoring a super important thing
47a7e81 ARC-0000 - made some changes
1d2b99f Merge pull request #540 from wapopartners/ARC-1502
* commits are replayed after 1d2b99f, also the commit hash values have changed
git rebase --continue (you would run this after you have fixed a conflict staged and want to continue the rebasing process)
590dd54 ARC-1545: minor code improvements. Sets textklass only in condition where it's needed...
9f1e2b9 ARC-1545: adds bottom margin
be57ccd ARC-1545: added comment and removed unnecessary code
102475e ARC-1545: adjusts artice-subhead enriched article class to be more like Escenic version...
a1b4dc8 Merge branch 'ARC-1520' into ARC-1545
92f9a5c ARC-1545: adjusts subheading generated code to keep original enriched article class
a08d42a Merge branch 'master' into ARC-1520
a0eacad ARC-1520: adds rule to override inline enriched blockquote styling to pull ARC version of font
d1e3910 1.1.42
25a6b3a Merge pull request #494 from wapopartners/ARC-1504
27fb845 ARC-1504: ADDED test for lib/identity/api.js
78a3aad ARC-1504: ADDED check the service string as the primary source of a user's subscriber status
7d5be0f 1.1.41
c164cd9 ARC-1452: (master) Unit test for video/manager.js and powa.js (#481)
1d2b99f 1.1.40
62679d9 Merge pull request #525 from wapopartners/revert-522-ARC-1525
7b7293a Revert "ARC-1525 : AdOps page target breakpoint (master)"
4032408 Merge pull request #522 from wapopartners/ARC-1525
8e32e23 1.1.39
5a5cba3 Merge pull request #498 from wapopartners/ARC-1514
f665252 ARC-1525 Corrects issue
70992e0 ARC-1520: adds noFigureStyles styling to make bleeds work again after change in HTML structure.
17f9699 fixing camel cased variables
a3a8193 ARC-1520: adjusts colour for enriched article-subhead, as requested
125e336 ARC-1545: minor code improvements. Sets textklass only in condition where it's needed...
dc98085 ARC-1545: adds bottom margin
6c0287a ARC-1545: added comment and removed unnecessary code
64d628d ARC-1545: adjusts artice-subhead enriched article class to be more like Escenic version for...
4b4eab5 ARC-1545: adjusts subheading generated code to keep original enriched article class
7e9b1bb ARC-1520: adds rule to override inline enriched blockquote styling to pull ARC version of font
b4318ab ARC-1520: adds noFigureStyles styling to make bleeds work again after change in HTML structure.
645781d ARC-1520: adjusts colour for enriched article-subhead, as requested
d1e3910 1.1.42
git rebase -i HEAD~2pick c164cd9 eslint fixes [Chester Rivas]
pick a4c0d8f finished refactoring the thing [Chester Rivas]
# Rebase c164cd9..a4c0d8f onto f0b1ed4 (2 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#f c164cd9 eslint fixes [Chester Rivas]
p a4c0d8f finished refactoring the thing [Chester Rivas]
# Rebase c164cd9..a4c0d8f onto f0b1ed4 (2 commands)
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
# x, exec = run command (the rest of the line) using shell
# d, drop = remove commit
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#*ideally you want to squash your commits into milestones in your code or any logical order that makes sense to you.
git reset --hard origin/ARC-0000rebase your branches only
rebase with origin/master first, then origin/development if necessary
squash commits to
git rebase --abort to exit out of
use tools like SourceTree to view the
use WebStorm's or Atom's merge conflict tools to resolve conflicts
git checkout ARC-000
git rebase origin/master
git push
#######################
# interactive and squashing commits
# last 5 commits locally
git rebase -i HEAD~5
# all commits from the time you branched off to your latest local commit
git rebase -i origin/master
# force push
git push -f
[rebase]
instructionFormat = %s [%an]*this will format each line when you run git interactive