Comments (13)
@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.
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):
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.
@wking Done at https://github.com/r-gaia-cs/swc-modular-shell/tree/cleanup.
from shell-novice.
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.
@wking Can you check again? Hope this time is OK.
from shell-novice.
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 explicitblocks 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 infind
example match filenames in diagram. 2. Using-print
withfind
.
+* 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.
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.
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 explicitblocks 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
withfind
. - 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 explicitblocks 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 explicitblocks with styles instead of fences
- Fixing formatting of pipe-and-filter challenges
-
- Making filenames in
find
example match filenames in diagram. 2. Using-print
withfind
.
- Making filenames in
- 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.
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
withfind
. - 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 explicitblocks with styles instead of fences
| * 60184e3 Fixing formatting of pipe-and-filter challenges
| * 7a90443 1. Making filenames infind
example match filenames in diagram. 2. Using-print
withfind
.
|/ - 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
…
- 508c142...5980d48 HEAD -> master (forced update)
from shell-novice.
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:
- swcarpentry/DEPRECATED-bc@a6fd62d (Fixes #546 by using level-3 headings in all
Markdown…, 2014-06-18) → 194ef9f. @gvwilson - swcarpentry/DEPRECATED-bc@8690c74 (In the novice shell lesson 03-pipefilter,
changed sort to sort -n…, 2014-06-12) → 595ad4f. @mestato - swcarpentry/DEPRECATED-bc@b94793c (1. Making filenames in
find
example
match…, 2014-02-10) → ca90754. @gvwilson - swcarpentry/DEPRECATED-bc@c80a5eb (Corrects runtime calculation for goostat and
goodiff…, 2014-02-08) → d57e6e9. @BernhardKonrad
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.
On Wed, Nov 05, 2014 at 09:46:49PM -0800, W. Trevor King wrote:
- swcarpentry/DEPRECATED-bc@a6fd62d (Fixes #546 by using level-3 headings in all
Markdown…, 2014-06-18) → 194ef9f. @gvwilson
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.
We're now live with additional post-bc history, so the window for feedback from @mestato and @BernhardKonrad has closed.
from shell-novice.
Sorry, I didn't realize someone was waiting for my input. It all looks good!
from shell-novice.
Related Issues (20)
- Glossary "shell" term has a broken anchor link in its text HOT 1
- removing unneeded files solution not quite right HOT 1
- Link to installation instructions points to a workshop template HOT 6
- Use consistent path settings
- Other Options for Finding Files in Episode 7
- Where do we get 1518 files? HOT 1
- Broken link to regex lesson HOT 6
- Consider moving callout about long/short options
- macOS now uses Zsh as default shell HOT 2
- Grammar Mistake in "07-find.md" at "Matching and Subtracting" solution.
- A detail in Unix Shell Pipes and Filters Lesson HOT 3
- Ep. 02: Link to Glossary not resolved
- Ep. 05: Remove redundant paragraphs HOT 1
- Broken link in list of external resources HOT 1
- Missing spaces between words HOT 2
- Broken link in Reference HOT 1
- Clarify statement "the total count of each type of animal" in "Pipes and filters" challenge HOT 1
- Checkout Recommendation for Trainee HOT 4
- Note that we are directing people to an Incubator (un-official) lesson HOT 1
- Unix Shell Script, Finding things, Tractknig a species, grep -r HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shell-novice.