How to Contribute Sticky

Jul 10, 2014, 12:29 am
#1
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,309
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..
Jul 10, 2014, 2:29 am
#2
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,309
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
Jul 10, 2014, 1:41 pm
#3
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
So that's fork, clone, scalpel, change, commit, beer, push - right? Or is it beer first...?
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Jul 11, 2014, 1:52 am
#4
Master mine stomper


Joined: Dec 16, 2007
Occupation: Shoveling. But metal.
Location: Blazing in the steppes
Interests: Absolutely fuck-all.
Posts: 2,050
Beer, fork, clone, beer, beer, scalpel, beer, change, commit, beer, push, wake up, correct, beer, apologize, push again.
Jul 11, 2014, 3:08 am
#5
Joined: Nov 22, 2008
Interests: IVAN
Posts: 1,170
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.
Beware! 'tis EagleV, Hardcore Weaver of Baskets!
Jul 13, 2014, 7:42 am
#6
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
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!
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Jul 13, 2014, 9:46 am
#7
Joined: Feb 20, 2012
Posts: 231
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.
Jul 13, 2014, 10:35 am
#8
Joined: Dec 2, 2007
Location: New Attnam
Interests: bananas
Posts: 2,309
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
Jul 13, 2014, 5:21 pm
#9
Joined: Sep 8, 2010
Occupation: Petty Functionary
Location: Drinking pea soup in the world map
Interests: Mangoes
Posts: 1,216
Awesome!
Batman? wrote
its been so long since i had gotten that far i didnt think it through. arrrr!!!!!!
Jump to