Git-Fu for Sponge ImplementationΒΆ

  1. cd Sponge
  2. git pull

Tip

Bring your master branch current before branching. git pull brings your branch (master at this point) up to date before branching it.

  1. git checkout -b YourBranchName

Tip

The name of your branch should follow a convention. Please try to use a name like feature/your-feature

  1. Work with the files, create files, etc.. Do your work in the branch.
  2. When you’re done working with the files you can do a check that the module will compile. This would be a good idea before even making the commit.

Tip

Run gradle compileJava to run a simple build of the source files.

  1. When you’re convinced that the build of your branch of the Sponge is ok then you can commit.
  2. git status
  3. Look for files that are noted as not staged for commit. Add the files that need to be staged for commit.
  4. git add FILE(s)
  5. Since you’re working with the implementation, there is a chance that your work also included work in the API. It’s OK to work in both at the same time. The trick is to make sure when you commit and push you do so that the pointers for which version of SpongeAPI are matched to your version of the branch (your commit). To ensure that, before you finish commit on your implementation work, double check the status of the working area. You may need to add the submodules to the commit.
  6. git add SpongeAPI (May be required)
  7. git add Mixin (May be required)
  8. git status (Look for unstaged commits. You should have already commited your SpongeAPI changes and pushed them before moving forward with the implementation commit and push).
  9. git commit
  10. Edit the commit message. This message should be short and concise.
  11. Now that you’ve made the commit, you can push this commit to the repository.
  12. git push

Tip

If this is the first time you’re pushing a commit for this new branch then the branch is not on the upstream remote. You may see this warning:

fatal: The current branch YourBranchName has no upstream branch.

To push the current branch and set the remote as upstream, use

git push --set-upstream origin YourBranchName

  1. Once your commit is pushed to the repository, then you can open a pull request