The new TFS2015 Build system is very powerful and easy to use.
but there are still no tasks for git integration and we are forced to use batch / Power Shell scripts.
commit / push
when a git is cloned by the build it creates a detached head (temporary branch)
do this (case sensitive):
git commit "<files>" -m "comment"
git branch -a // show all branches optional
git rebase HEAD <branch name>
git push origin <branch name>
**
make sure the build agent user has "Exempt from policy enforcement" set
to allow otherwise the push will fail if branch policies exist.
Warning
I
have noticed that using pull request with a build policy and the build
performs updates to the repository causes the pull request to not
function correctly as rebase also pushes the pull request.
branch polices
Although written, for all new users to Git, Visual studio will not let you create a Pull request
(available since VS2015.1) from the same branch locally to the same branch remotely.
the ideal way is to use git flow and create pull request from develop to master
No comments:
Post a Comment