Azure Devops Pipeline: Flow for committing the code into same branch
Scenario: Connecting to a GitHub repository and modify the files and commit back to Github.
Steps1: Initially we will keep all the necessary modules as per the workflow. Once after completing the code we have to commit back to Github.
Step 2: Now the below code will be useful while committing back to GitHub
git init
git config user.email "<githubUserMailId>"
git config user.name "<githubUserName>"
git status
git remote -v
git add *
git status
git commit -m "added files"
git push origin HEAD:<the Initial BranchName>
git status
This helps to track the modified files and commit them back to Github.
Note: To commit to another branch we have to add the below steps
git branch <NewBranchName>
git checkout <NewBranchName> before git add * line.
http://www.mukeshkumar.net/Upload/ebook/Azure-DevOps-CI-CD-Pipeline-Practical-Guide.pdf
ReplyDeleteReference for Azure Devops with Github