Changes

Jump to: navigation, search

DPS909 & OSD600 Winter 2017 - Git Walkthrough

1,503 bytes added, 16:37, 11 January 2017
no edit summary
|}
Save the file and let's check our repo's status:
<pre>
</pre>
Here git reports that one of our '''tracked''' files has '''Changes not staged for commit.''' In other words, it sees that the version of <code>docs/index.html</code> in our '''Working Directory''' differs from what is in the last commit.
Git sees changes on a per-line basis to our files. We can ask git to show us what's changed by using <code>git diff</code>:
 
<pre>
$ git diff
diff --git a/docs/index.html b/docs/index.html
index b762da7..f43edfa 100755
--- a/docs/index.html
+++ b/docs/index.html
@@ -5,7 +5,7 @@ layout: home
<main class="bd-masthead" id="content">
<div class="container">
<span class="bd-booticon outline">B</span>
- <p class="lead">Bootstrap is the most popular HTML, CSS, and JS framework in the world for building responsive, mobile-first projects on the web.</p>
+ <p class="lead">Bootstrap is an amazing HTML, CSS, and JS framework in the world for building responsive, mobile-first projects on the web.</p>
<p class="lead">
<a href="{{ site.baseurl }}/getting-started/download/" class="btn btn-lg" onclick="ga('send', 'event', 'Jumbotron actions', 'Download', 'Download {{ site.current_version }}');">Download Bootstrap</a>
</p>
</pre>
 
This <code>diff</code> tells us a few things:
* the file <code>docs/index.html</code> changed
* the change to this file starts at line 5 in the original, and we have 7 lines of context
* the actual line that changed is shown with a delete (<code>-<code>) followed by an addition (<code>+</code>)
===Step 6: moving and removing files===

Navigation menu