<p>Evelyn Huang has uploaded this change for <strong>review</strong>.</p><p><a href="https://review.coreboot.org/20948">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Documentation: Update Lesson2.md<br><br>Update Lesson2.md to include information about updating a commit after<br>it has been pushed to the remote repository.<br><br>Change-Id: Iebf86113b13d859d9c9e3db51e22ea44cb1144f6<br>Signed-off-by: Evelyn Huang <evhuang@google.com><br>---<br>M Documentation/Lesson2.md<br>1 file changed, 28 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/20948/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/Documentation/Lesson2.md b/Documentation/Lesson2.md<br>index 55d8188..ee865c7 100644<br>--- a/Documentation/Lesson2.md<br>+++ b/Documentation/Lesson2.md<br>@@ -251,4 +251,31 @@<br> on https://github.com/magicmonty/bash-git-prompt. Listed in that section are<br> various lines that you can copy, uncomment and add to your .bashrc file to<br> change the configurations. Example configurations include avoid fetching remote<br>-status, and supporting versions of Git older than 1.7.10.<br>\ No newline at end of file<br>+status, and supporting versions of Git older than 1.7.10.<br>+<br>+## Appendix: Miscellaneous Advice<br>+<br>+### Updating a commit after running git push: <br>+<br>+Suppose you would like to update a commit that has already pushed to the<br>+remote repository. If the commit you wish to update is the most recent<br>+commit you have made, after making your desired changes, stage the files<br>+(either using git add or in git cola), and amend the commit. To do so,<br>+if you are using the command line, run "git commit --amend." If you are<br>+using git cola, click on the gear icon located on the upper left side under<br>+**Commit** and select **Amend Last Commit** in the drop down menu. Then, stage<br>+the files you have changed, commit the changes, and run git push to push the<br>+changes to the remote repository. Your change should be reflected in Gerrit as<br>+a new patch set.<br>+<br>+If, however, the commit you wish to update is not the most recent commit you<br>+have made, you will first need to checkout that commit. To do so, find the<br>+URL of the commit on <https://review.coreboot.org> and go to that page; if<br>+the commit is one that you previously pushed, it can be found by selecting<br>+**My** and then **Changes** in the upper left corner. To checkout this commit,<br>+in the upper right corner, click on **Download**, and copy the command listed<br>+next to checkout by clicking **Copy to clipboard**. Then, run the copied<br>+command in your coreboot repository. Now, the last commit should be the most<br>+recent commit to that patch; to update it, make your desired changes, stage<br>+the files, then amend and push the commit using the instructions in the above<br>+paragraph.<br></pre><p>To view, visit <a href="https://review.coreboot.org/20948">change 20948</a>. To unsubscribe, visit <a href="https://review.coreboot.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://review.coreboot.org/20948"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: coreboot </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Iebf86113b13d859d9c9e3db51e22ea44cb1144f6 </div>
<div style="display:none"> Gerrit-Change-Number: 20948 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Evelyn Huang <evhuang@google.com> </div>