-
Notifications
You must be signed in to change notification settings - Fork 0
Developers Guide
Souq currently uses Git for its version control system.
Forking a repository is a simple two-step process.
-
On Github.com, navigate to the cryptocracy/souq repository.
-
In the top-righ corner of the page, click Fork

In order to propose changes to the upstream, or original, repository. It's good practice to regularly sync your fork with the upstream repository. To do this, you'll need to use Git on the command line.
If you haven't yet, you should first setup Git. Don't forget to set up authentication to Github from Git as well.
Right now, you have a fork of the Souq repository, but you don't have the files of that repository on your computer. Let's create a clone of your fork locally on your computer.
-
On Github, navigate to your fork of the Souq repository.
-
Under the repository name, click Clone or download
- In the Clone with HTTPs section, click Clip Board Icon to copy the clone URL for the repository.

-
Open Git Bash
-
Now we need to clone down your fork, first type
git clonethen paste from your clipboard$ git clone https://github.com/Your-Username/souq
Upon Enter your local clone will be created
Cloning into `souq`...
remote: Counting objects: X, done.
remote: Compressing objects: 100% (X/X), done.
remove: Total X (delta 1), reused X (delta 1)
Unpacking objects: 100% (X/X), done.
You now have a local copy of your fork of the Souq repository.
When you fork the repo, in order to propose changes to the original repo, you can configure Git to pull changes from the original, upstream, repository into the local clone of your fork.
-
First copy the original Souq repo Clone URL:
https://github.com/cryptocracy/souq.git -
Open Git Bash
-
Change Directories into the local folder of the fork you cloned earlier.
$ cd /path/to/the/clone -
Type
git remote -vand press Enter. You'll see the currently configured remote repository for your fork.
$ git remote -v
origin https://github.com/Your-Username/souq.git (fetch)
origin https://github.com/Your-Username/souq.git (push)
- Type
git remote add upstream, and then paste the URL from step 3.1 and press Enter. It will look like this:
$ git remote add upstream https://github.com/cryptocracy/souq.git
- To verify the new upstream repository has been set, type
git remote -vagain. You should see the URL for your fork as theorigin, and the URL for the original cryptocracy/souq repository as theupstream.
$ git remote -v
origin https://github.com/Your-Username/souq.git (fetch)
origin https://github.com/Your-Username/souq.git (push)
upstream https://github.com/cryptocracy/souq.git (fetch)
upstream https://github.com/cryptocracy/souq.git (push)
Now you can keep your fork synced with the upstream repository with a few Git commands.
-
Open Git Bash
-
Make sure you are in the current working directory of the clone of your fork
-
First fetch the branches and their respective commits fromt eh upstream repository. Commits to the
masterwill be stored in a local branch,upstream/master.
$ git fetch upstream
remote: Counting objects: X, done.
remote: Compressing objects: 100% (X/X), done.
remote: Total X (delta X), reused X (delta X)
Unpacking objects: 100% (X/X), done.
From https://github.com/cryptocracy/souq
* [new branch] master -> upstream/master
- Checkout your fork's local
masterbranch.
$ git checkout master
Switched to branch 'master'
- Merge the changes from
upstream/masterinto your localmasterbranch. This brings your fork'smasterbranch into sync with the upstream repository, without losing your local changes. example
$ git merge upstream/master
Updating a422352..5fdff0f
Fast-forward
README | 9 -------
README.md | 7 ++++++
2 files changed, 7 insertions(+), 9 deletions(-)
delete mode 100644 README
create mode 100644 README.md
If your local branch didn't have any unique commits, Git will instead perform a "fast-forward": example
Updating 34e91da..16c56ad
Fast-forward
README.md | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Tip: Syncing your fork only updates your local copy of the the repository. To update your fork on Github, you must push your changes to it. And then when ready invoke a Pull Requests from your fork back to the original cryptocracy/souq repository.
