How to work with Github
GhoulofGSG9
Join Date: 2013-03-31 Member: 184566Members, Super Administrators, Forum Admins, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Reinforced - Supporter, WC 2013 - Supporter, Pistachionauts
I have written this little essay because I think it would be a general improvement if more modder would use github:
Images are in the spoilers
First of all what are the advantages of using github:
Ok now let’s go, here is how you use github the easiest way:
First Steps:
Create your first repo:
A repo is basically where you store your project:
Working with a repo:
Update the github explorer folder to create a changelog and commit changes
to branch: Use merge to pull all changes of a branch into another one
(e.g merge dev into master)
Fork repos from other users (use the website for that) to e.g. write
patches for them.
At the end here is a good example of working with github : Shine
I wish you alot of fun exploring github
Images are in the spoilers
First of all what are the advantages of using github:
- Be Social
- Share your code with the rest of the world, so maybe some other devs read it
and help you to improve it - Give people a chance to be a part of the workflow by commenting on changes and posting issues
- Work as team: By using github all team members work on the same version of the code and can easily share their changes
- Wiki: Store all needed infos about the project right with the code
- Follow other Projects to get latest updates
- Share your code with the rest of the world, so maybe some other devs read it
- Automatically Project-Management:
- Check the changes you have made easily before committing them, if a change should break something roll back with one click
- Work with forks and braches: want to try something create a fork /branch with one click and work
on a project without changing the main source, if your new changes
improve the project in the way you wanted. Merge them into the master fork or if you
don’t own the project sent a pull request so maybe also the owner
likes your changes and merge it. - Statistics: Github provides you with all kind of statistics. do you want to see who committed how much at what time? - no problem
- Issue management: Manage reported issues and feature requests in the way you want and make lists what has to be fixed first
- Easily search for methods, lines etc at your repo
- Lost your local files, no problem github has a backup
- Don’t waste time: Want to work on your project, now you can do it everywhere where you have access to the internet
Ok now let’s go, here is how you use github the easiest way:
First Steps:
- Sign up at github.org (You only need a email a username and a password)
- Download the github client (either for win or mac, linux has a built in gitshell)
- Log into Github with the client
Create your first repo:
A repo is basically where you store your project:
- Go to local ->repositories
- Click on create
- Choose a name and a location to store the repo
- Click on create
- Now you will notice that there is a new repo, open it
- Some important files (optimal) are already stored inside the repo:
- .gitattributes : convert files like e.g .doc to text
- .gitignore :all files git will ignore like temp files of compiler or SDK
- readme : Basic infos about your project
- license: The lincense which is used for your project (e.g. GPU v2)
-
Now add files by clicking on tools -> open in explorer and just copy all codes
you already have. Best way to go is to create the repo first and
then use the folder as output at the spark launch pad - Before you can publish/sync you have to commit the (first) changes. Every
commit needs a little title like : Patch to work with Build 251 - Publish/sync to upload your changes to github
- Create/manage branches (click at master) : Branches are simple said copies of you
master branch which allow you to work on the code without changing
the master branch.
Working with a repo:
Update the github explorer folder to create a changelog and commit changes
to branch: Use merge to pull all changes of a branch into another one
(e.g merge dev into master)
Fork repos from other users (use the website for that) to e.g. write
patches for them.
At the end here is a good example of working with github : Shine
I wish you alot of fun exploring github
Comments
All shown features are included in the github client, so is there any other advantage than that it is a web app?