Azure DevOps 构建过程创建 Git 分支

Azure DevOps Build Process Create Git Branch

各位,

我将简要描述一下我的问题。我在 TFS Git 存储库中有一个 Angular 应用程序,现在我想用 Azure DevOps 构建这个应用程序,完成后,我想从 Master[=] 创建一个新的 Git 分支13=]

构建过程运行顺利,不能只创建一个新分支。你能帮助我吗 ?

我尝试使用像

这样的 Powershell 脚本

git branch [aNewBranch] master

git checkout -q [aNewBranch]

但它不起作用。

我猜你需要从你的 master 分支中创建一个分支[所有更改都在 master 分支中]。

执行这些步骤。

Just check the logs 
    git log --oneline -10

Fetch everything from repo
    git fetch origin [or any remote name]

Keep checking the logs 
    git log --oneline -10

go to master branch 
    git checkout master
        if master branch does not exists in your local machine - 
            create it with : git checkout -b master 

Now you are in master branch. 

rebase with master branch 
    git rebase origin/master

If you have some code changes already done in master branch (I am guessing the changes are not committed) - 
        git commit -am "Commit message here.. for your changes" [params : a for all, m for message]

Keep checking the logs 
    git log --oneline -10

Currently you are in master with new changes [with new commit]

Now go to new branch with changes [as it is in master - I guess this is what you expect]
        git checkout -b NewBranch

Keep checking the logs 
    git log --oneline -10