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
- Central - Official code
- Start from master branch
- Create a new branch locally
git checkout -b new-feature, -b create a new branch
- Make changes on the new branch locally
git commit -m
- Push to github
- 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