In order to get moving with Instant Answer development, you'll need to setup your environment. There are three main steps:
Fork the appropriate repository on Github.com
Set Up the Development Environment
Clone Your Github Fork into the Development Environment
Already have a GitHub Account? Perfect, move to the next step.
Git is a tool that allows many people to collaborate on one codebase. GitHub is a popular site for groups to host Git repositories. If this is your first time using Git and GitHub, we've created an overview of how you'll use Git to contribute to DuckDuckHack.
To get started, let's sign up for GitHub:
Go to https://github.com/join and enter the required information, then click "Create an Account"
Click "Finish Signup" to continue with a Free GitHub account.
Let's obtain the latest copy of the open-source code powering all Instant Answers. We're going to "fork" that code, so you'll have your own personal copy which you can modify and test without affecting the original.
Make sure you are logged in to Github.com as yourself
Go to the corresponding Instant Answer repository homepage:
Click "Fork", near the top-right corner.
Wait while the repo forks...
You should see a page that looks nearly identical to the repo home page you were just on. The URL should be different though, it should look like
This is the URL for your personal fork of the DuckDuckHack code. Keep it handy, we'll be using it in a minute!
NOTICE: DuckDuckHack is in maintenance mode. The DuckPAN development setup is not guaranteed to continue working during this time. Also, the previous Codio.com Development Environment has been removed and is no longer available.
Please see the documentation for alternate development environments if needed.
Now we'll put it all together - we'll bring the code we forked on Github onto the environment we set up. This is called cloning a repository.
Open your Terminal.
git clone <Your GitHub URL Here>.git into the Terminal, replacing
<Your GitHub URL Here> accordingly. It should look something like this for a Goodie:
$ git clone https://github.com/githubusername/zeroclickinfo-goodies.git
Enter your Github credentials as prompted.
If your Github password doesn't work, you may need to enter a Personal Access Token as your password instead. Simply copy and paste your token from your Github Settings when prompted for your password. (This happens if you have set up Github's Two-Factor Authentication feature.)
Press "Enter". You should see the Terminal print out some text that looks like this:
$ git clone https://github.com/githubusername/zeroclickinfo-goodies.gitCloning into 'zeroclickinfo-goodies'...remote: Counting objects: 18623, done.remote: Compressing objects: 100% (8083/8083), done.remote: Total 18623 (delta 8084), reused 18179 (delta 7868)Receiving objects: 100% (18623/18623), 5.50 MiB | 9.51 MiB/s, done.Resolving deltas: 100% (8084/8084), done.Checking connectivity... done.
Change into the current directory of the terminal by typing
cd zeroclickinfo-xxxxx, where "xxxxx" is whichever Instant Answer type you chose.
To start working on a new change, create a new branch in your repository for this particular project. Make sure to work on a separate branch for each contribution.
Create a new branch by typing
git checkout -b branch_name. You can use any branch name you like. You can switch between branches by using
git checkout branch_name.
Congrats! You've now cloned the DuckDuckHack code into your development environment. You're now prepared to code your first Instant Answer. Start hacking with one of our walkthroughs.
If this is your first time using Git and GitHub, we've created an overview of how you'll use Git to contribute to DuckDuckHack.
Want help? Need to think out loud? There are several ways to get in touch with staff, leaders, and community members. We look forward to hearing from you!
P.S. Let us know if we can improve anything in these documents by opening issues directly on Github.