Процесс сборки DevOps Azure Создание ветки Git - PullRequest
0 голосов
/ 20 декабря 2018

люди,

Я дам вам краткое описание моей проблемы.У меня есть приложение Angular в репозитории TFS Git, теперь я хочу создать это приложение с помощью DevOps Azure. Когда это будет сделано, я хочу создать новую ветку Git из Master

Процесс сборки выполняется плавно, только создаваяновая ветка невозможна.Вы можете мне помочь ?

Я пробую его с помощью скрипта Powershell, например

git branch [aNewBranch] master

или

git checkout-q [aNewBranch]

но это не работает.

1 Ответ

0 голосов
/ 20 декабря 2018

Я предполагаю, что вам нужна ветка из вашей главной ветки [со всеми изменениями, как в основной ветке iin].

Выполните эти шаги.

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
...