VCMI has migrated to Github. The new repository address is: github.com/vcmi/vcmi
[size=150]Guidelines:[/size]
Initially, the workflow will be loosely based on the Gitflow recommendations:
- the main development branch is called “develop” (equivalent to the SVN trunk)
- the “master” branch will be kept in a stable-release quality (typically pointing to the last released build)
- before the stable release, a separate branch is created. The fixes made to develop are merged to it (but no risky changes).
- the branches dedicated to a some feature development should be named “feature/FeatureName”. Similarly, the branches aiming to fix a specific bug should be named “bug/BugNr”.
Gitflow references:
atlassian.com/git/workflows … ow-gitflow
nvie.com/posts/a-successful-git-branching-model/
[we won’t do the whole thing now because I doesn’t seem reasonable for our scale]
If you have any suggestions about the workflow changes we should adopt, it is a good place to share them. I don’t want to change too much at once — we just migrated rfom SVN, to first I’d like to see how the whole Git thing settles dow — and during this time, we should consider which model we want to strive to.
[size=150]Basic Git usage tutorial:[/size]
-
SVN-like
First “pull”. Make chcanges. Then “commit” and “push”. [If you are working from command line, then before “commit” the "add"will be needed to select what changes will be committed.]
Obviously, this works only if you have privilage to push to the repository — so you need to be an accepted team member. -
Pull-request based
Fork the repository. Make changes, push them to your fork. Open a pull request and wait for one of us to review the code and eventually merge changes to the main repo.
If you are a team member, you don’t have to fork — you can just create a separate branch and push changes with it. Then it is possible to open a pull request for the branch (and have it checked/merged by someone else). Or, if you don’t want code review, just merge it.
help.github.com/articles/using-pull-requests
[size=150]Visual Studio and Git[/size]
Visual Studio 2013 has built-in Git support. It isn’t complete, but having most important Git commands integrated in IDE is very convienent. Update 2 brings a few handy features (blame).
Visual Studio 2012 [which you shouldn’t use anyway] can similar (though more limited) features through official plugin. visualstudiogallery.msdn.microso … 724bdb980c
Because Visual Studio support is limited, I recommend having installed some else Git client. Eg TortoiseGit code.google.com/p/tortoisegit/
Starting with VS Git plugin
Open Team Explorer. Click the “Connect to Team Projects” icon at the Team Explorer’s top bar. Make sure that the “Local Git Repositories” node is expanded and click the “Clone” below it. Enter the repo address ( github.com/vcmi/vcmi ) in the first field, and your desired path for the repo to be placed. Click clone. Done.
The Team Explorer contains a few main panels (available when the “Home” top bar button is pressed):
- Changes panel is used to browse uncommitted changes and committing them
- Branches panel allows to quickly create, merge, and switch branches.
- Unsynced Commits panel is for performing push and pull operations. The “sync” button does the “pull-push” combo.
- Settings are settings. Make sure that the entered data is correct (it is used identify commits).
Further reading: msdn.microsoft.com/en-us/library … 50437.aspx
Further watching: microsoftvirtualacademy.com/ … jump-start
[size=150]Command-line / general Git tutorials:[/size]
There are tons of tutorials, so I won’t repeat them:
rogerdudler.github.io/git-guide/
git-scm.com/book
vogella.com/tutorials/Git/article.html