Skip to content

Commit cd724f0

Browse files
authored
Merge pull request #71 from numpy/doc/getting-started
DOC: First draft to help getting the code
2 parents 873f8d3 + 84ab320 commit cd724f0

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

doc_developer/getting_the_code.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Getting the code
2+
3+
This document explains how to get the source code for NumPy-Financial using Git.
4+
5+
## Code Location
6+
7+
NumPy-Financial is hosted on GitHub. The repository URL is https://github.com/numpy/numpy-financial.
8+
9+
## Creating a fork
10+
11+
To create a fork click the green "fork" button at the top right of the page. This creates a new repository on your
12+
GitHub profile. This will have the URL: https://github.com/<your_username>/numpy-financial.
13+
14+
## Cloning the repository
15+
16+
Now that you have forked the repository you will need to clone it. This copies the repository from GitHub to the local
17+
machine. To clone a repository enter the following commands in the terminal.
18+
19+
```shell
20+
git clone https://github.com/<your_username>/numpy-financial.git
21+
```
22+
23+
Hooray! You now have a working copy of NumPy-Financial.
24+
25+
26+
## Updating the code with other's changes
27+
28+
From time to time you may want to pull down the latest code. Do this with:
29+
30+
```shell
31+
git fetch
32+
```
33+
34+
The `git fetch` command downloads commits, files and refs from a remote repo into your local repo.
35+
36+
Then run:
37+
38+
```shell
39+
git merge --ff-only
40+
```
41+
42+
The `git merge` command is Git's way of putting independent branches back together. The `--ff-only` flag tells git to
43+
use `fast-forward` merges. This is preferable as fast-forward merge avoids creating merge commits.

0 commit comments

Comments
 (0)