Concept of Branches

▪ Branches are used for better collaboration

▪ A "main" branch (also called "master") is created by default when a new repository is initialized

▪ Each developer can then create temporary branches e.g. for a feature or bugfix and work on it without worrying to break the main branch

git pull # will pull down the changes from the remote repo to our local repo, and merge them with a local branch.
git checkout # allows restoring tree files or switching branches
git checkout -b # creating and switching to a new branch
git push # sends our changes to the remote repo.

Git only allows to push if your changes don't cause a conflict.

Master(ready for production) and Develop branch

▪ dev branch : intermediary master

▪ during sprint : features and bug merge into dev branch

end of sprint : merge into master branch

▪ with MASTER branch

only master branch for continuous integration/delivery

● pipeline is triggered whenever feature/bugfix code is merged into master

▪ with DEV branch

● deploying every single feature/bugfix

● features/bugfixes are collected in dev branch

● dev branch often becomes "work in progress" branch

Last updated