Tuesday, September 10, 2019

Git - workflow


Centralized
  • Someone created central repo
  • Devs Clone central repo to local machines
  • Make commits locally
  • Push to central repo "git push origin master"
  • Manage "diverge" or "merge conflict "if someone else push before you
  • Rebase first "git pull --rebase origin master" conflict will show
  • Make some edits, then "git add <some-file>"
  • git rebase --continue
  • Then push
Feature Branch Workflow
  • Central - Official code
  • Start from master branch 
git checkout master
    git fetch origin
      git reset --hard origin/master
      • Create a new branch locally

      git checkout -b new-feature, -b create a new branch

      • Make changes on the new branch locally
      git add
      git commit -m

      • Push to github
      git push -u origin new-feature, -u add it as remote tracking branch, next time just do" git push "

      • After push, create "pull request", open for review
      • After pull request is approved and conflict free, do "Merge" from pull request
      • Like Centralized workflow
      • Synchronize the local master first, Merge your local feature branch to master, Then push



      No comments:

      Post a Comment

      API interview questions

        https://www.katalon.com/resources-center/blog/web-api-testing-interview-questions/ Top 50+ Web API Testing Interview Questions [Ultimate l...