How to Contribute

https://attnam.com/topics/How-to-Contribute

The Cathedral of Attnam > Other Coding

#1 Jul 10, 2014, 12:29 am Hide

capristo

I was going about this the wrong way by adding every contributor to the Attnam organization. I trust everyone who's in there now, but what contributors should really be doing is forking the repo and submitting pull requests with their contributions.


Create a Github.com account. Go to our repository:

https://github.com/Attnam/ivan

In the top right, click "Fork" to create your own copy of the code.

If your username is "frodo", for example, you will now have your own fork at

https://github.com/frodo/ivan

You can then "Clone" that repository onto your local computer. Edit the code locally, make any changes, then "Commit" and finally "Push" back to the master branch of your fork. For Windows, I recommend TortoiseGIT

For *nix systems:
git clone https://github.com/frodo/ivan.git

# Check for modified files:
git ls-files -m

# Check for new files:
git ls-files -o

# For each modified or new file (or folder, this command is recursive)
git add filename

# After all files have been added, check status again to make sure. Should output nothing
git ls-files -m
git ls-files -o

# Now commit and push
git commit -m 'Description of changes'

git push origin master

Then back on Github, go back to your fork link.

On the top left is a green button to create a "pull request." When you create a pull request you're basically saying "I made some changes on my own fork, and I'd like you to review them and merge them into the original repository"

Then one of us will approve or deny the pull request.

I'll add more detail later..
#2 Jul 10, 2014, 2:29 am Hide

capristo

I should note that this doesn't apply to Pent or Warheck. More for people who want to make minor contributions such as bug fixes, or add their own features/ideas that haven't necessarily been agreed upon for the official release
#3 Jul 10, 2014, 1:41 pm Hide

fejoa

So that's fork, clone, scalpel, change, commit, beer, push - right? Or is it beer first...?
#4 Jul 11, 2014, 1:52 am Hide

Ernomouse

Beer, fork, clone, beer, beer, scalpel, beer, change, commit, beer, push, wake up, correct, beer, apologize, push again.
#5 Jul 11, 2014, 3:08 am Hide

Eagle V

You forgot the huge amounts of coffee that go into code. I believe the formula, according to Einstein, is V = Lc² with V the volume of coffee in liters, L the number of lines of code, and c the speed of light in vacuum, in m/s.
#6 Jul 13, 2014, 7:42 am Hide

fejoa

So for example, I committed and pushed these changes to my branch "warheck-sandbox". Once I have fleshed out the full functionality more or less, then I can either create a pull request (preferable), or just push the changes to "master" myself (lucky admin guy).
Long live git!
#7 Jul 13, 2014, 9:46 am Hide

Pent

Warheck wrote
then I can either create a pull request (preferable), or just push the changes to "master" myself (lucky admin guy).

As the lucky admin guys, wouldn't we be the ones approving the pull requests anyways? (Not to say we should skip them, as it gives people a chance to discuss changes before adding them; I'd say the only things that should be directly pushed to master are small bug fixes.)

Now, time to play with some fire.
#8 Jul 13, 2014, 10:35 am Hide

capristo

Right.

If you're one of the 5 current admins, stay within the Attnam/ivan repository
- push directly into master for small bug fixes
- create your own branch and merge it in for large changes

If you're not, fork the repository and then submit pull requests to the master branch that one of the admins can approve
#9 Jul 13, 2014, 5:21 pm Hide

fejoa

Awesome!