From 1e2aedd7e770f5afdb9a038f56e5107dbe03d199 Mon Sep 17 00:00:00 2001 From: Thomas Perryman Date: Wed, 31 Jan 2018 20:44:17 +0000 Subject: [PATCH 1/3] Answered: How can I __revert__ a commit? --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 47c329b..7c77c8a 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,13 @@ If you have any other questions not listed here, please raise a PR to have it ad - Q: How can I __revert__ a commit? +$ git commit -m "Something terribly misguided" (1) +$ git reset HEAD~ (2) +<< edit files as necessary >> (3) +$ git add ... (4) +$ git commit -c ORIG_HEAD (5) +comment from: https://stackoverflow.com/questions/927358/how-to-undo-the-most-recent-commits-in-git + - Q: I keep accidentally adding files I don't want to commit (e.g. compiled code, files with passwords etc.), how can I __ignore__ these files? - Q: What's the difference between `git pull` and `git fetch`? From 0d110c22602d20ed113510fb13401e19ea01f307 Mon Sep 17 00:00:00 2001 From: Thomas Perryman Date: Wed, 31 Jan 2018 20:53:01 +0000 Subject: [PATCH 2/3] Added newlines --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7c77c8a..cf3d3f8 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,13 @@ If you have any other questions not listed here, please raise a PR to have it ad - Q: How can I __revert__ a commit? -$ git commit -m "Something terribly misguided" (1) -$ git reset HEAD~ (2) -<< edit files as necessary >> (3) -$ git add ... (4) -$ git commit -c ORIG_HEAD (5) -comment from: https://stackoverflow.com/questions/927358/how-to-undo-the-most-recent-commits-in-git +$ git commit -m "Something terribly misguided" (1). +$ git reset HEAD~ (2). +<< edit files as necessary >> (3). +$ git add ... (4). +$ git commit -c ORIG_HEAD (5). +comment from: https://stackoverflow.com/questions/927358/how-to-undo-the-most-recent-commits-in-git. + - Q: I keep accidentally adding files I don't want to commit (e.g. compiled code, files with passwords etc.), how can I __ignore__ these files? From 5dc19d15caec970783dd65c0cc952d9b11b1340d Mon Sep 17 00:00:00 2001 From: Thomas Perryman Date: Wed, 31 Jan 2018 20:54:50 +0000 Subject: [PATCH 3/3] Markdown for newline improved --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cf3d3f8..d7b8f1a 100644 --- a/README.md +++ b/README.md @@ -26,12 +26,12 @@ If you have any other questions not listed here, please raise a PR to have it ad - Q: How can I __revert__ a commit? -$ git commit -m "Something terribly misguided" (1). -$ git reset HEAD~ (2). -<< edit files as necessary >> (3). -$ git add ... (4). -$ git commit -c ORIG_HEAD (5). -comment from: https://stackoverflow.com/questions/927358/how-to-undo-the-most-recent-commits-in-git. +`$ git commit -m "Something terribly misguided" (1).` +`$ git reset HEAD~ (2).` +`<< edit files as necessary >> (3).` +`$ git add ... (4).` +`$ git commit -c ORIG_HEAD (5).` +`comment from: https://stackoverflow.com/questions/927358/how-to-undo-the-most-recent-commits-in-git.` - Q: I keep accidentally adding files I don't want to commit (e.g. compiled code, files with passwords etc.), how can I __ignore__ these files?