Skip to content

Commit 5b95d99

Browse files
committed
Improved changelog and examples on home page
1 parent b23adde commit 5b95d99

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ sections:
3636
"v0.0.1": "#v0-0-1"
3737
---
3838
## <a name="v0-3-3" href="#v0-3-3">v0.3.3</a> (2015-03-16)
39+
40+
- Layering on to 0.3.2, provided further necessary fixes.
41+
3942
## <a name="v0-3-2" href="#v0-3-2">v0.3.2</a> (2015-03-16)
4043

4144
- Ensures that all devDependencies are downloaded and Atom Shell builds.

css/main.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,7 @@ hr {
4141
color: #C2C2C2;
4242
font-size: 80%;
4343
}
44+
45+
header h1 {
46+
margin-bottom: 8px;
47+
}

index.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,22 +87,37 @@ Let's learn how to clone a repository. Create a file named `clone.js`,
8787
and add the following code:
8888

8989
``` javascript
90-
Git.Clone("https://github.com/nodegit/nodegit", "tmp").then(function(repository) {
91-
90+
Git.Clone("https://github.com/nodegit/nodegit", "nodegit").then(function(repository) {
91+
// Work with the repository object here.
9292
});
9393
```
9494

95+
This will clone our repository into a folder named `nodegit`.
96+
9597
### <a name="open-a-repository"></a>Open a Repository
9698

9799
Let's learn how to open a repository. Create a file named `open.js`,
98100
and add the following code:
99101

100102
``` javascript
101-
Git.Repository.open("tmp").then(function(repository) {
102-
103-
});
103+
var getMostRecentCommit = function(repository) {
104+
return repository.getBranchCommit("master");
105+
};
106+
107+
var getCommitMessage = function(commit) {
108+
return commit.message();
109+
};
110+
111+
Git.Repository.open("nodegit")
112+
.then(getMostRecentCommit)
113+
.then(getCommitMessage)
114+
.then(function(message) {
115+
console.log(message);
116+
});
104117
```
105118

119+
This will open our cloned repository and read out the latest commit's message from master.
120+
106121
* * *
107122

108123
## <a name="brought-to-you-by"></a>Brought to you by

0 commit comments

Comments
 (0)