我们有两个分支Branch1和Branch2,彼此相差100个提交。我从Branch1创建了一个新的BranchA分支。没有对BranchA做出任何提交。
有没有办法可以将BranchA更改为从Branch2分支出来,这样我就可以对Branch2进行提交并提出拉取请求 - 但它不会从Branch1进行任何提交?
答案 0 :(得分:5)
由于尚未向'use strict';
angular.module('myApp', [])
.controller('mainController', function ($scope, $location, $log) {
$scope.changeUrl = function() {
var path = $location.path();
var id =Math.floor(Math.random() * 60) + 20;
$location.url(path + '?customer=' + id);
$log.info('path='+path);
$log.info('id='+id);
};
});
添加任何提交,您只需将其重置为?customer=23
:
BranchA
如果你需要保留Branch2
的任何提交,你可以选择改变:
git checkout BranchA
git reset --hard Branch2