##FAQ
- How do I start up the app?
meteor --settings settings-development.json
- Add your name on the google doc bit.ly/codebuddies-hangouts-platform-v2-googledoc if your name is not listed, and you want to be recognized as a collaborator.
- Say hello on the #codebuddies-meta channel in the Slack. Feel free to ask questions here, or to ask for someone to review your pull request.
- Install Meteor and Node: docs.npmjs.com/cli/install if you don't already have them installed.
- Please star this repository! We need to reach 100 stars so that we can apply to the Open Collective.
- Fork this repository! Once you have a copy of this repo on your own account, clone this repo to your computer by typing in something like:
git clone https://github.com/codebuddiesdotorg/cb-v2-scratch.git
(Replace the URL with your own repository URL path.) - Type
meteor --settings settings-development.json
in your terminal to start up the app in your browser (localhost:3000
). (npm run meteor:dev
can also run the app, but will likely use up your CPU.) - Look at some of the open issues and identify one that sparks your interest. If you want to work on the issue, leave a comment on it saying that you're working on it!
- If you have any questions about the issue you're looking at, you can leave a comment in there, or ask in the #codebuddies-meta Slack channel. Read below for more instructions about how to work with branches.
- Type
git branch -a
to see a list of all the branches besidesmaster
, the default branch you're in. Note that if you want to switch to a branch returned in the last, you would typegit checkout BRANCHNAME
. You can read more about how to create a new branch to work on an issue below.
If you see a bug in the app or have a feature request, feel free to create a new issue on the Github repo!
I've picked out an issue I want to work on and left a comment on the issue to tell everyone that I'm working on it. Now what?
-
To work on a new feature, leave a comment on the issue saying that you're working on it. Then, you need to create a new branch for the issue. You can do it by typing:
git checkout -b NAME_OF_NEW_BRANCH
So for example, if you wanted to work on issue #29 github.com/codebuddiesdotorg/cb-v2-scratch/issues/29, you should type:
git checkout -b fix/issue-29-limit-140-characters
Please remember to include the issue number in the name of the branch.
How you name your branch doesn't really matter as long as you put the issue number in there, so that other people can figure out what you're working on. Putting the number of the issue in your branch name helps prevent duplicate branches.
All right. After we've created our branch, the next step is to push our new branch to the repo by typing:
git push origin NAME_OF_NEW_BRANCH
Now we can make commits to our branch (git commit -am "commit message"
) and git pull
to get other people's changes to the branch, and git push
our own commits to the branch.
Finally, when you're finished working on the fix or feature in your branch, you'll need to submit a pull request!
Click on the "pull request" button by going to https://github.com/codebuddiesdotorg/cb-v2-scratch/pulls and clicking on "new pull request." Next, select your branch, and submit.
One of the github maintainers (@linda or someone else) will look over your pull request and accept it.
- As you're working, it's always a good idea to check which branch you're in by typing
git branch
. When you firstgit clone
the repo, you'll only see a single branch, but you can discover other branches you can check out by typinggit branch -a
.
For example, to check out the feature/active-users
branch, you would type git checkout feature/active-users
in your command line.
#####Our staging site is located at http://cbv2-staging.herokuapp.com.
While you're working, you should try to merge in the latest from master
occasionally while you are in your branch. You can do this by typing:
git merge master
.
Again, type this while you are in your branch.
When you are ready to merge your branch back into the main app, type git checkout master
, git pull
, and then git merge BRANCHNAME
.
@anbuselvan is working on integrating javascript; automated testing will be available soon in the dev/testing
branch.
Merge conflicts come up when there is a conflict between code that you've written and code that other people have git push
ed into your branch.
Conflicts might also come up when you type git merge staging
to merge in the changes from staging into your branch.
If you see a conflict, don't panic!
If you are unfamiliar with how to resolve a merge conflict in git, you should read this: https://githowto.com/resolving_conflicts.
In summary, the steps are:
-
open up the file(s) with the conflict.
-
Be sure to remove all traces of >>>>> , ======, and <<<<<< from the file.
-
If you're unsure about a merge conflict, or would like to pair to solve it with someone else, ask in the #codebuddies-meta channel on Slack.
-
Save the file after you've cleared up the conflict.
-
git add [filename]
. -
git commit -m "message" [filename]
. -
You're done! Now you can continue to
git push
andgit pull
andgit merge staging
while you're inside your branch.
##How do I start up the app locally and log in as an admin?
- add your email and username to
settings-development.json
. meteor reset && meteor --settings settings-development.json
.- you will receive your password in your email .
- admin login
http://localhost:3000/admin
.
Note: When you create a hangout in localhost:3000, a Slack notification will be sent to the #cb2-test channel. This emulates what happens when you create a hangout on codebuddies.org/; a Slack announcement about the hangout will appear in the #general channel.
##Reminders:
-
Remember, you can always check which branch you are in by typing
git branch
orgit branch -a
to see all the branches that exist. -
Remember to
git pull
occasionally to get the new commits and branches others have pushed up. -
To minimize large messes of merge conflicts, you can
git merge master
occasionally if you're working inside a branch that you intend to merge back intomaster
. Make sure you're in this branch when you typegit merge master
. -
Type
npm run meteor:dev
to run this app. Your terminal will tell you to open up a new browser window at http://localhost:3000. -
Remember to leave a comment on the issue if you decide to start working on an issue, so that others know.
-
Remember to join the
#codebuddies-meta
channel on the CodeBuddies Slack (go to codebuddiesmeet.herokuapp.com if you need an invitation to the Slack) to discuss updates to this project and to ask questions. We'll be there!