- create repository on bitbucket via web UI
- go to project directory folder on your machine
- git init
- git remote add origin "URL to repo"
- eclipse (with egit plugin) - share project using git
- commit & push
Ref:
public InitialStateEntity findByIdWithLock(Long id)
{
DetachedCriteria criteria = DetachedCriteria.forClass(InitialStateEntity.class);
criteria.add(Restrictions.idEq(id));
criteria.setLockMode(LockMode.PESSIMISTIC_WRITE);
return (InitialStateEntity) criteria.getExecutableCriteria(getSession()).uniqueResult();
}