Hello codeforces,
Today, I have released git-contest which is the Git Extension for online judges. It is the tool to manage your online judge solutions on git repository.
In solving online judge problems, using git hosting service (GitHub, BitBucket or etc...), at times you will be able to manage solutions easily, at other times you will be able to share your solutions usefully, and I think it is good to practice git operating.
demo
What is git-contest
Mainly, git-contest has two features:
- Submit a solution to online judge, and create a commit with a submission status automatically.
- Manage git branch.
Its branching model is below:
Currently, git-contest supports the following online judges:
- Codeforces: http://mirror.codeforces.com/
- Aizu Online Judge: http://judge.u-aizu.ac.jp/onlinejudge/
- UVa Online Judge: http://uva.onlinejudge.org/
Why use git-contest
I have managed my online judge solutions using git and GitHub. For example:
However I think it takes a few steps by hand, it is annoying, so I decided to create a git extension to do that effectively. The concept of git-contest is inspired by nvie/gitflow and this article.
How to install git-contest
It needs ruby (>= 1.9.2) and git (>= 1.7). After install them:
$ gem install git-contest
This is all you have to do.
How to configuration git-contest
If you submit a solution to codeforces, you have to set login information. It is written like the followings:
~/.git-contest/config.yml
sites:
codeforces:
driver: codeforces
user: {your_codeforces_id}
password: {your_codeforces_password}
How to use git-contest
Examples showing the use are the followings:
$ git contest init -> initialize current directory as git repository for git-contest $ git contest start foo_contest -> start contest-branch $ write solution... $ git contest submit foo_online_judge -p 12345 -> submit your solution to online judge -> create a commit with the submission status $ git contest finish foo_contest -> finish contest-branch, and it is merged main-branch
Open source project
git-contest is open source project. So its source code has been published on GitHub. The link is the following:
Pull Requests and patches are welcome. If you thought of a good idea about this project, let me know.
// Thanks :)
my first thoughts
But thanks! I'll start solving uva in 1-2 months, and mb I'll use it to save my solutions for teammates
ha ha, I think both of these are important :)
From promoted to div-1, I have attempted to solve only div-2 C, D problems in an hour during contest, but the rating was down.
Here is a demo animated gif of git-contest: