我完全搞砸了我的分叉git仓库的主分支.
我想完全重置使用上游主仓库的内容推送到我的分支的主分支.我没有兴趣保留任何主分支更改或历史记录.
最简单的方法是删除我的分叉仓库并从上游项目中重新编译.但是,我在其他推动的分支机构工作,我不想失去.
那么如何用上游主站重置推送的主分支?
git clone https://myrepo.git
cd myrepo
git remote add upstream https://upstream.git
git fetch upstream
Run Code Online (Sandbox Code Playgroud)
我从哪里开始使用上游主站重置本地和远程主分支?
Attempted to load class "Month" from namespace "DoctrineExtensions\Query\Mysql". Did you forget a "use" statement for another namespace当我尝试创建按年和月获取数据的查询时出现错误
在我的存储库中
public function getCongePris($mois,$annee,$matricule)
{
$emConfig = $this->_em->getConfiguration();
$emConfig->addCustomDatetimeFunction('YEAR', 'DoctrineExtensions\Query\Mysql\Year');
$emConfig->addCustomDatetimeFunction('MONTH', 'DoctrineExtensions\Query\Mysql\Month');
$qb = $this->createQueryBuilder('co')->leftJoin('co.personnel','p');
$qb->select('co')
->where('p.matricule= :matricule')->andWhere('co.statutDemande=:statut ')
->andWhere('MONTH( co.debutConge)=:mois')->andWhere('YEAR(co.debutConge)=:annee');
$qb->setParameter('annee',$annee)->setParameter('mois',$mois)->setParameter('matricule',$matricule)->setParameter('statut','ACCEPTE');
$conges = $qb->getQuery()->getResult();
return $conges;
}
Run Code Online (Sandbox Code Playgroud)
在我的 config.yml 里面
orm:
auto_generate_proxy_classes: "%kernel.debug%"
naming_strategy: doctrine.orm.naming_strategy.underscore
auto_mapping: true
dql:
string_functions:
MONTH: DoctrineExtensions\Query\Mysql\Month
YEAR: DoctrineExtensions\Query\Mysql\Year
Run Code Online (Sandbox Code Playgroud)