Giter Club home page Giter Club logo

Comments (13)

rgaiacs avatar rgaiacs commented on July 23, 2024

@wking can you check if this are the commit that need a cleanup at the commit-message? I can do the cleanup after get a green light.

from shell-novice.

wking avatar wking commented on July 23, 2024

On Fri, Oct 31, 2014 at 06:23:16PM -0700, Raniere Silva wrote:

Just so we can find them again after rebasing, I'll copy down some of
those commit summaries for posterity:

  • 69fe2c3 (In the novice shell lesson 03-pipefilter…, 2014-06-12)
  • 75ebce5 (* Getting rid of old cheat sheets…, 2014-02-27)
  • 3671a8a (1. Making filenames in find example match…, 2014-02-10)
  • 79b05ed (Corrects runtime calculation for goostat and goodiff…, 2014-02-08)

Also long and worth adjusting (e.g. it's missing the blank line
between the summary and the body):

  • 39df817 (Fixes #546 by using level-3 headings in all Markdown…, 2014-06-18)

Don't worry about a PR for this. Just let me know when you've got
them fixed, and point me at a branch in your public repo.

I'd usually handle this sort of thing with ‘rebase -i’, but that
doesn't play well with a mergy history. It might be easiest to do
something like:

$ git checkout -b wip $LONG_COMMIT
$ git commit --amend
… fix the message …
$ git checkout master
$ git rebase -p --onto wip $THE_COMMIT_AFTER_THE_LONG_COMMIT
$ git branch -d

You'd want to start with the newest long commit and work your way back
to avoid having the hashes change under you, although you could always
look up the new hash by searching for the summary text in the logs.

from shell-novice.

rgaiacs avatar rgaiacs commented on July 23, 2024

@wking Done at https://github.com/r-gaia-cs/swc-modular-shell/tree/cleanup.

from shell-novice.

wking avatar wking commented on July 23, 2024

On Sat, Nov 01, 2014 at 05:23:46AM -0700, Raniere Silva wrote:

@wking Done at https://github.com/r-gaia-cs/swc-modular-shell/tree/cleanup.

Hmm, looks like you dropped the commit after the long message:

$ git diff master..r-gaia-cs/cleanup
diff --git a/00-intro.md b/00-intro.md
index 8da32a0..502b1bf 100644
--- a/00-intro.md
+++ b/00-intro.md
@@ -117,7 +117,7 @@ Commands are terse (often only a couple of characters long),
their names are frequently cryptic,
and their output is lines of text rather than something visual like a graph.
On the other hand,
-the shell allows us to combine existing tools in powerful ways with only a few keystrokes.
+the shell allows us to combine existing tools in powerful ways with only a few keystrokes
and to set up pipelines to handle large volumes of data automatically.
In addition,
the command line is often the easiest way to interact with remote machines.

$ git log --oneline master | grep -A1 'Adding links to reference'
271097f Adding links to reference material on appropriate pages
39df817 Fixes #546 by using level-3 headings in all Markdown source files for subsections. We continue to use level-4 headings for objectives, key points, callout boxes, and challenges.
$ git log --oneline r-gaia-cs/cleanup | grep -A1 'Adding links to reference'
$ echo "$?"
1

I guess it should have been:

$ git rebase -p --onto wip $LONG_COMMIT

You could patch those commits back into your cleaned-up history, but
it might be easier to just:

$ git reset --hard origin/master

and start over (grepping through ‘git log -p r-gaia-cs/cleanup’ to
grab your new commit messages for copy-pasting and finally wrapping up
with a ‘git push -f r-gaia-cs cleanup’).

from shell-novice.

rgaiacs avatar rgaiacs commented on July 23, 2024

@wking Can you check again? Hope this time is OK.

from shell-novice.

wking avatar wking commented on July 23, 2024

On Sun, Nov 02, 2014 at 01:00:52PM -0800, Raniere Silva wrote:

@wking Can you check again? Hope this time is OK.

Hmm. This time the output matches :), but it looks like we're
flattening some history:

$ diff -u <(git log --graph --topo-order --pretty=format:%s origin/master) <(git log --graph --topo-order --pretty=format:%s r-gaia-cs/cleanup)

@@ -55,12 +52,11 @@

  • Converting shell lesson Markdown files to use div + fence block
  • Merge branch 'sticking-with-jekyll' of github.com:gvwilson/bc into sticking-with-jekyll
    |\
    -| * Removing explicit 'level' keys from Markdown files
    | * Switching to explicit
     blocks with styles instead of fences
    -* | * Getting rid of old cheat sheets…
    |/
    +* Removing explicit 'level' keys from Markdown files
  • Fixing formatting of pipe-and-filter challenges
    -* 1. Making filenames in find example match filenames in diagram. 2. Using -print with find.
    +* Improve at find lesson
  • Slight edit to @BernhardKonrad's chnages
  • Specify key points

The “Removing explicit 'level' keys from Markdown files” commit seems
to have been shifted into the first-parent branch, and now it lands
before “Switching to explicit

 blocks…”.  It also looks like
we've dropped the long “Getting rid of old cheat sheets…” commit, but
that's fine, because the only changes we see from that commit were
duplicated in the “Removing explicit 'level' keys from Markdown files”
commit. If this flattening was intentional, it would be nice to have
some notes about this stuff. Otherwise I'll try and find time to look
through the revised history to check that the changes make sense.

from shell-novice.

rgaiacs avatar rgaiacs commented on July 23, 2024

If this flattening was intentional, it would be nice to have some notes about this stuff.

It isn't.

Otherwise I'll try and find time to look through the revised history to check that the changes make sense.

Sorry for the trouble.

from shell-novice.

wking avatar wking commented on July 23, 2024

On Mon, Nov 03, 2014 at 09:03:11AM -0800, Raniere Silva wrote:

Otherwise I'll try and find time to look through the revised
history to check that the changes make sense.

Sorry for the trouble.

No trouble, it's good to know what commits needed fixing, and to know
where the history was tricky. However, it's hard to restore flattened
history, so I ended up just starting over from master. Start a new
branch:

$ git checkout -b commit-message-cleanup origin/master

Look around the the newest commit @r-gaia-cs found for some context:

$ git log --graph --topo-order --oneline --decorate | grep -2 'using level-3 headings in all Markdown'
|/|

  • | 271097f Adding links to reference material on appropriate pages
  • | 39df817 Fixes #546 by using level-3 headings in all Markdown source files for subsections. We continue to use level-4 headings for objectives, key points, callout boxes, and challenges.
  • | 109c527 Merge pull request #538 from mestato/fixing-sort-in-shell-lesson-3
    |\ \

Fix that commit:

$ git checkout -b wip 39df817
$ git commit --amend
…add a blank line between the summary and body…
$ git checkout commit-message-cleanup
$ git rebase -p --onto wip 39df817

Check our work:

$ git log --graph --topo-order --oneline --decorate | grep -2 'using level-3 headings in all Markdown'
|/|

  • | 9639dc8 Adding links to reference material on appropriate pages
  • | ee98acb (wip) Fixes #546 by using level-3 headings in all Markdown source files for subsections.
  • | 109c527 Merge pull request #538 from mestato/fixing-sort-in-shell-lesson-3
    |\ \

So we have the same graph, with a better commit summary :). Kill
the wip branch, since we don't need the marker anymore:

$ git branch -D wip

Moving on to the next oldest commit, we'll get some context:

$ git log --graph --topo-order --oneline --decorate | grep -4 'In the novice shell lesson 03-pipefilter'

  • | 9639dc8 Adding links to reference material on appropriate pages
  • | ee98acb Fixes #546 by using level-3 headings in all Markdown source files for subsections.
  • | 109c527 Merge pull request #538 from mestato/fixing-sort-in-shell-lesson-3
    |\ \
    | * | 69fe2c3 In the novice shell lesson 03-pipefilter, changed sort to sort -n. In the lesson , the "sort" command is used to demonstrate sorting line counts. The lesson as written does not produce the given output on the bash shell (but does on Mac OS X terminal). By adding the -n to sort, the example should behave the same across all platforms.
    | |/
  • | cfc826b Small fix to Shell Challenges
    |/
  • 1e3f092 Merge pull request #514 from gvwilson/every-challenge-in-its-own-div

Fix that commit:

$ git checkout -b wip 69fe2c3
$ git commit --amend
…add two newlines after the summary sentence, and wrap the body…
$ git checkout commit-message-cleanup
$ git rebase -p --onto wip 69fe2c3

Check our work:

$ git log --graph --topo-order --oneline --decorate | grep -4 'In the novice shell lesson 03-pipefilter'

  • | b4e2e4e Adding links to reference material on appropriate pages
  • | 42fa38b Fixes #546 by using level-3 headings in all Markdown source files for subsections.
  • | 7188a8e Merge pull request #538 from mestato/fixing-sort-in-shell-lesson-3
    |\ \
    | * | afed874 (wip) In the novice shell lesson 03-pipefilter, changed sort to sort -n
    | |/
  • | cfc826b Small fix to Shell Challenges
    |/
  • 1e3f092 Merge pull request #514 from gvwilson/every-challenge-in-its-own-div

So we have the same graph, with a better commit summary :). Kill
the wip branch, since we don't need the marker anymore:

$ git branch -D wip

Moving on to the next oldest commit, we'll get some context:

$ git log --graph --topo-order --oneline --decorate | grep -4 'Getting rid of old cheat sheets'

  • 60d1cf5 Merge branch 'sticking-with-jekyll' of github.com:gvwilson/bc into sticking-with-jekyll
    |\
    | * 114fa8d Removing explicit 'level' keys from Markdown files
    | * 9280fee Switching to explicit
     blocks with styles instead of fences
  • | 75ebce5 * Getting rid of old cheat sheets * Indenting error output cells * Removing explicit 'level' keys from Markdown files * Storing the generated files so that people who don't use those tools won't have to regenerate them. * Modifying .gitignore to reflect this. * Updating the Makefile to run Jekyll exactly once. * Command to install on the server * No longer worrying about making a page of images * Better (more guessable) name for the target that builds the website * Fixing image paths * Fixing up glossary entries
    |/
  • 31cc85b Fixing formatting of pipe-and-filter challenges
  • 3671a8a 1. Making filenames in find example match filenames in diagram. 2. Using -print with find.
  • 23f1536 Slight edit to @BernhardKonrad's chnages

The summary for 75ebce5 suspiciously contains “Removing explicit
'level' keys from Markdown files”, which is the whole summary for
114fa8d. Lets see what's actuall in 75ebce5:

$ git show 75ebce5 | grep '^[-+]'
--- a/00-intro.md
+++ b/00-intro.md
-level: novice
--- a/01-filedir.md
+++ b/01-filedir.md
-level: novice

Maybe we don't need this commit at all. Comparing 114fa8d with
the subsequent merge in 60d1cf5:

$ git cat-file -p 114fa8d | grep tree
tree b41ba26aa06eeaadb6422034261d526f1b68590b
$ git cat-file -p 60d1cf5 | grep tree
tree b41ba26aa06eeaadb6422034261d526f1b68590b

Lets just drop the long gutted commit (75ebce5) and the useless
merge (60d1cf5):

$ git rebase -p --onto 114fa8d 60d1cf5

Check our work:

$ git log --graph --topo-order --oneline --decorate | grep -2 'keys from Markdown files'
|/

  • 2f62054 Converting shell lesson Markdown files to use div + fence block
  • 114fa8d Removing explicit 'level' keys from Markdown files
  • 9280fee Switching to explicit
     blocks with styles instead of fences
  • 31cc85b Fixing formatting of pipe-and-filter challenges

So we've completely dropped the branch that 75ebce5 was on, along
with its subsequent merge :). Moving on to the final wordy
commit, we'll get some context:

$ git log --graph --topo-order --oneline --decorate | grep -2 'Corrects runtime calculation for goostat and goodiff'
|/

  • 6384334 Minor typo
  • 79b05ed Corrects runtime calculation for goostat and goodiff. 300 choose 2 is 300*299/2. Also the conversion from seconds to weeks was off.
  • da57d31 Preparing material for Version 5 novice release
  • 8c5c84c Merge pull request #255 from wking/no-shebangs

Fix that commit:

$ git checkout -b wip 79b05ed
$ git commit --amend
…add two newlines after the summary sentence, and wrap the body…
$ git checkout commit-message-cleanup
$ git rebase -p --onto wip 79b05ed

Check our work:

$ git log --graph --topo-order --oneline --decorate | grep -2 'Corrects runtime calculation for goostat and goodiff'
|/

  • 7160798 Minor typo
  • d57e6e9 (wip) Corrects runtime calculation for goostat and goodiff
  • da57d31 Preparing material for Version 5 novice release
  • 8c5c84c (bash-novice) Merge pull request #255 from wking/no-shebangs

So we have the same graph, with a better commit summary :). Kill
the wip branch, since we don't need the marker anymore:

$ git branch -D wip

Compare with our original tree:

$ git cat-file -p origin/master | grep tree
tree d4903d6a5dae671dd3e07cf8d853966b131b475e
$ git cat-file -p HEAD | grep tree
tree d4903d6a5dae671dd3e07cf8d853966b131b475e

so we haven't lost any content. What about our graph?

$ diff -u <(git log --graph --topo-order --pretty=format:%s origin/master) <(git log --graph --topo-order --pretty=format:%s HEAD)
--- /dev/fd/63 2014-11-05 21:14:12.639503264 -0800
+++ /dev/fd/62 2014-11-05 21:14:12.639503264 -0800
@@ -27,10 +27,10 @@
| |/
|/|

  • | Adding links to reference material on appropriate pages
    -* | Fixes #546 by using level-3 headings in all Markdown source files for subsections. We continue to …
    +* | Fixes #546 by using level-3 headings in all Markdown source files for subsections.
  • | Merge pull request #538 from mestato/fixing-sort-in-shell-lesson-3
    |\ \
    -| * | In the novice shell lesson 03-pipefilter, changed sort to sort -n. In the lesson , the "sort" …
    +| * | In the novice shell lesson 03-pipefilter, changed sort to sort -n
    | |/
  • | Small fix to Shell Challenges
    |/
    @@ -53,12 +53,8 @@
  • | Match number of samples and math in novice shell Introduction
    |/
  • Converting shell lesson Markdown files to use div + fence block
    -* Merge branch 'sticking-with-jekyll' of github.com:gvwilson/bc into sticking-with-jekyll
    -|\
    -| * Removing explicit 'level' keys from Markdown files
    -| * Switching to explicit
     blocks with styles instead of fences
    -* | * Getting rid of old cheat sheets * Indenting error output cells * Removing explicit 'level' …
    -|/
    +* Removing explicit 'level' keys from Markdown files
    +* Switching to explicit
     blocks with styles instead of fences
  • Fixing formatting of pipe-and-filter challenges
    1. Making filenames in find example match filenames in diagram. 2. Using -print with find.
  • Slight edit to @BernhardKonrad's chnages
    @@ -71,7 +67,7 @@
  • | Corrects comments in middle.sh script
    |/
  • Minor typo
    -* Corrects runtime calculation for goostat and goodiff. 300 choose 2 is 300_299/2. Also the conversion…
    +_ Corrects runtime calculation for goostat and goodiff
  • Preparing material for Version 5 novice release
  • Merge pull request #255 from wking/no-shebangs
    |\

Looks great :) (I've truncated the long commit messages by hand
in that paste, because they make it hard to read the diff).
Adjust our local master to point at this commit, and drop the
temporary commit-message-cleanup branch name:

$ git checkout master
$ git reset --hard commit-message-cleanup
$ git branch -D commit-message-cleanup

Push to the public repo, clobbering the old master:

$ git push -f origin master

from shell-novice.

wking avatar wking commented on July 23, 2024

Ah, I missed swcarpentry/DEPRECATED-bc@b94793c (1. Making filenames in find
example match…, 2014-02-10). Find some context:

$ git log --graph --topo-order --oneline --decorate | grep -2 'Making filenames in'

  • 52fcfd4 Switching to explicit
     blocks with styles instead of fences
  • 60184e3 Fixing formatting of pipe-and-filter challenges
  • 7a90443 1. Making filenames in find example match filenames in diagram. 2. Using -print with find.
  • 683acd7 Slight edit to @BernhardKonrad's chnages
  • 093eef4 Specify key points

Fix the commit:

$ git checkout -b wip 7a90443
$ git commit --amend
…I wrote a new summary line here…
$ git checkout master

Lets show the viscinity before the rebase this time, just so
everyone's clear on the --onto syntax:

$ git log --graph --topo-order --oneline --decorate wip 52fcfd4 | head -n 6

  • ca90754 (wip) find: Use -print and adjust filenames to match the diagrams
    | * 52fcfd4 Switching to explicit
     blocks with styles instead of fences
    | * 60184e3 Fixing formatting of pipe-and-filter challenges
    | * 7a90443 1. Making filenames in find example match filenames in diagram. 2. Using -print with find.
    |/
  • 683acd7 Slight edit to @BernhardKonrad's chnages

So the rebase is taking everything in master that's after 7a90443
(starting with 60184e3) and grafting it onto wip (ca90754). That
drops 7a90443, and replaces it with wip (ca90754) which has the
shorter summary:

$ git rebase -p --onto wip 7a90443

Check the results:

$ git log --graph --topo-order --oneline --decorate | grep -2 'adjust filesnnames'

  • e6c92a5 Switching to explicit
     blocks with styles instead of fences
  • 01cd6db Fixing formatting of pipe-and-filter challenges
  • ca90754 (wip) find: Use -print and adjust filenames to match the diagrams
  • 683acd7 Slight edit to @BernhardKonrad's chnages
  • 093eef4 Specify key points

Looks good. Kill the wip branch:

$ git branch -D wip

And publish (clobbering the old master):

$ git push -f origin master

from shell-novice.

wking avatar wking commented on July 23, 2024

In the previous two comments I explained how I cleaned up the commit
messages. It's nice to ask folks to acknowledge changes like that
though, to avoid putting words into their mouth. I was mostly
shifting whitespace around, but still, the reworded messages were:

Could you each just check the changed commit messages (the commit
hashes should be clickable in the GitHub web UI) and confirm that
they're acceptable?

from shell-novice.

wking avatar wking commented on July 23, 2024

On Wed, Nov 05, 2014 at 09:46:49PM -0800, W. Trevor King wrote:

Heh, although the GitHub UI doesn't actually show the difference here
(it does show differences for the other altered commit messages).
Here's the Git UI for this particular change:

$ git log -1 --oneline a6fd62d
a6fd62d Fixes #546 by using level-3 headings in all Markdown source files for subsections. We continue to use level-4 headings for objectives, key points, callout boxes, and challenges.
$ git log -1 --oneline 194ef9f
194ef9f Fixes #546 by using level-3 headings in all Markdown source files for subsections.
$ diff -u <(git log -1 a6fd62d) <(git log -1 194ef9f)
--- /dev/fd/63 2014-11-05 21:51:00.729560521 -0800
+++ /dev/fd/62 2014-11-05 21:51:00.729560521 -0800
@@ -1,6 +1,7 @@
-commit a6fd62d2baffad9d41f7391c1ddfd4d37ad3048f
+commit 194ef9f
Author: Greg Wilson [email protected]
Date: Wed Jun 18 08:07:43 2014 -0400

   Fixes #546 by using level-3 headings in all Markdown source files for subsections.
  • We continue to use level-4 headings for objectives, key points, callout boxes, and challenges.

from shell-novice.

wking avatar wking commented on July 23, 2024

We're now live with additional post-bc history, so the window for feedback from @mestato and @BernhardKonrad has closed.

from shell-novice.

BernhardKonrad avatar BernhardKonrad commented on July 23, 2024

Sorry, I didn't realize someone was waiting for my input. It all looks good!

from shell-novice.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.