我有一个带有master分支和second_branch的项目。两个分支中的数据不同,我想将数据从主分支复制到second_branch,然后在GitHub上更新second_branch。我怎么能这样做?
second_branch的状态为:
这个分支提前3次提交,1次提交主人
答案 0 :(得分:2)
您可以使用<form>
<select name="ReportDD" title="No dependencies">
<option value="SelectReport">Select Report</option>
<option value="ClaimsBySupplier">Claims By Supplier</option>
<option value="ClaimsByDepartment">Claims By Department</option>
</select>
<!-- SuppNameDD is activated when ReportDD = "ClaimsBySupplier" -->
<select name="SuppNameDD"
title="Requires ClaimsBySupplier"
data-dependencies="ReportDD=ClaimsBySupplier">
<option value="">Select SuppName</option>
<option value="SupplierName">Supplier Name</option>
</select>
<!-- SuppNameDD is activated when ReportDD = "ClaimsBySupplier" and SuppNameDD = "SupplierName" -->
<select name="ReviewPeriodDD"
title="Requires ClaimsBySupplier and SupplierName"
data-dependencies="ReportDD=ClaimsBySupplier;SuppNameDD=SupplierName">
<option value="">Select RewiewPeriod</option>
<option value="ReviewPeriod1">Review Period 1</option>
<option value="ReviewPeriod2">Review Period 2</option>
</select>
<!-- TxtGRC1 is activated when ReviewPeriodDD has any of non-empty values -->
<input type="text"
name="TxtGRC1"
title="Requires ReviewPeriodDD to have any non-empty value"
placeholder="Txt 1"
data-dependencies="ReviewPeriodDD"/>
<!-- TxtGRC2 is activated when ReviewPeriodDD = "ReviewPeriod2" and TxtGRC1 has any value -->
<input type="text"
name="TxtGRC2"
title="Requires ReviewPeriod2 and TxtGRC1 filled"
placeholder="Txt 2"
data-dependencies="ReviewPeriodDD=ReviewPeriod2;TxtGRC1"/>
</form>
将分支指向其他提交。所以,在git reset
,
second_branch
然后git reset --hard master
更新GitHub。