History

Responsive News Git Workflow

But... Why?

A New Workflow

$ git checkout -b feature-branch develop
$ git checkout -b feature-branch develop
$ git commit -am 'did some workz'
$ git commit -am 'did some more workz'
$ git commit -am 'finished the workz'
$ git checkout -b feature-branch develop
$ git commit -am 'did some workz'
$ git commit -am 'did some more workz'
$ git commit -am 'finished the workz'
$ git rebase develop feature-branch
$ git checkout -b feature-branch develop
$ git commit -am 'did some workz'
$ git commit -am 'did some more workz'
$ git commit -am 'finished the workz'
$ git rebase develop feature-branch
$ git rebase -i HEAD~3
pick 35b0146 did some workz
pick 0cb461d did some more workz
pick db1c450 finished the workz

# Rebase c8908e7..db1c450 onto c8908e7
#
# 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
#
# 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.
#
# Note that empty commits are commented out
pick 35b0146 did some workz
squash 0cb461d did some more workz
squash db1c450 finished the workz

# Rebase c8908e7..db1c450 onto c8908e7
#
# 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
#
# 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.
#
# Note that empty commits are commented out
# This is a combination of 3 commits.
# The first commit's message is:
did some workz

# This is the 2nd commit message:

did some more workz

# This is the 3rd commit message:

finished the workz

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# rebase in progress; onto c8908e7
# You are currently editing a commit while rebasing branch 'master' on 'c8908e7'.
#
# Changes to be committed:
#	modified:   the-work-file
#
Implement the work

This change implements all of the work, ever. We never need to do any
work ever again because it is all done.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# rebase in progress; onto c8908e7
# You are currently editing a commit while rebasing branch 'master' on 'c8908e7'.
#
# Changes to be committed:
#	modified:   the-work-file
#
Implement the work. Closes NEWS-1234.

This change implements all of the work, ever. We never need to do any
work ever again because it is all done.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# rebase in progress; onto c8908e7
# You are currently editing a commit while rebasing branch 'master' on 'c8908e7'.
#
# Changes to be committed:
#	modified:   the-work-file
#
$ git checkout -b feature-branch develop
$ git commit -am 'did some workz'
$ git commit -am 'did some more workz'
$ git commit -am 'finished the workz'
$ git rebase develop feature-branch
$ git rebase -i HEAD~3
[detached HEAD cbec3b5] Implement the work. Closes NEWS-1234.
 1 file changed, 1 insertion(+), 7 deletions(-)
Successfully rebased and updated refs/heads/master.
$ git checkout -b feature-branch develop
$ git commit -am 'did some workz'
$ git commit -am 'did some more workz'
$ git commit -am 'finished the workz'
$ git rebase develop feature-branch
$ git rebase -i HEAD~3
[detached HEAD cbec3b5] Implement the work. Closes NEWS-1234.
 1 file changed, 1 insertion(+), 7 deletions(-)
Successfully rebased and updated refs/heads/master.
$ git push -f origin feature-branch

Git Workflow at the BBC

By Joseph Wynn

Git Workflow at the BBC

  • 1,604