From The Mana World
Line 14: Line 14:
''sudo apt-get install git''
''sudo apt-get install git''


== Using Git ==
== Setting Up Git ==


Once you have installed Git, your first task should be to create a personal copy (also known as a fork) of the server data on your GitHub account.  This will allow you to make changes and save them to a place where the content leaders can retrieve copies to include in the main server.  It's also easier to work with.
Once you have installed Git, your first task should be to create a personal copy (also known as a fork) of the server data on your GitHub account.  This will allow you to make changes and save them to a place where the content leaders can retrieve copies to include in the main server.  It's also easier to work with.
Line 31: Line 31:
**The ''--recursive'' command tells Git to copy all of the data.
**The ''--recursive'' command tells Git to copy all of the data.
**The ''foldername'' at the end of the command is the name of the folder you want the data in.
**The ''foldername'' at the end of the command is the name of the folder you want the data in.
Note that copying the data may take some time.
After the data is finished cloning to your computer, you need to tell it how to keep track of changes.
When a repo (short for repository) is cloned, it has a default remote called ''origin'' that points to your fork on GitHub, not the original repo it was forked from. To keep track of the original repo, you need to add another remote which we will name ''mainline''.
*Issue the command ''git remote add mainline git://github.com/themanaworld/tmwa-server-data.git''

Revision as of 21:27, 5 June 2012

Git is a distributed revision control and source code management system.

GitHub is a web-based hosting service for projects that use the Git revision control system.

Together, these two tools allow developers working on The Mana World to easily collaborate and merge changes into the game.

Installing Git

To install Git on Windows, follow the step-by-step instructions found at GitHub.

To install Git on Linux, refer to the package installation method for your distribution.

Example: for Ubuntu distributions, a command would be issued in a terminal window: sudo apt-get install git

Setting Up Git

Once you have installed Git, your first task should be to create a personal copy (also known as a fork) of the server data on your GitHub account. This will allow you to make changes and save them to a place where the content leaders can retrieve copies to include in the main server. It's also easier to work with.

To create a fork, login to your GitHub account and go to the TMW Repository.

  • You will see a button on the page that says Fork. Click it.
  • You should now see a page that has some details and history for the fork you just created. At the top will be a series of buttons including one that says SSH. Clicking the SSH button will create a link for you to copy which will be needed in the next step. It will look like git@github.com:yournamehere/tmwa-server-data.git. Copy that link.

You now need to create a copy of the data on your computer to work with (also known as a clone).

If you are using Windows, open the Git Bash tool which you installed earlier.

If you are using Linux, open a terminal window.

  • Navigate to the folder where you want to create your clone.
  • Now issue the command to have Git create a copy, replacing the example with the link you copied earlier: git clone --recursive git@github.com:yournamehere/tmwa-server-data.git foldername
    • The --recursive command tells Git to copy all of the data.
    • The foldername at the end of the command is the name of the folder you want the data in.

Note that copying the data may take some time.

After the data is finished cloning to your computer, you need to tell it how to keep track of changes.

When a repo (short for repository) is cloned, it has a default remote called origin that points to your fork on GitHub, not the original repo it was forked from. To keep track of the original repo, you need to add another remote which we will name mainline.