Professional Documents
Culture Documents
Git Workflow Document
Git Workflow Document
Branch Pattern............................................................................................................. 3
GIT INITIAL WORKFLOW PROCESS ................................................................................ 4
GIT REPEATITIVE WORKFLOW PROCESS ....................................................................... 6
2
SOLID INDIA CAPABILITY DOCUMENT
Branch Pattern
Main Branches 3:
Master Branch (For Development Environment)
Staging Branch (For Testing Environment)
Production Branch (For Production Environment)
3
SOLID INDIA CAPABILITY DOCUMENT
GIT INITIAL WORKFLOW PROCESS
1. Install Laravel
NOTE: Always Start Work In New Branch And Never In Master . If two people are working on the
same feature the branch name should be same.
6. Make changes and once all the changes are done add all files to staging and commit
if we have made changes in front end then build files in production Environment before
commiting
$ npm run prod
$ git add .
$ git commit (Enter detailed message)
10. Copy the https url of the remote repo and add remote origin to the local repo
$ git remote add origin YOUR_LINK_TO_REMOTE_REPO
11. Checkout to the feature branch which we want to push to the remote repo
$ git checkout <FEATURE_NAME>
12. If remote feature branch is updated then first pull those changes into your local feature branch.
$ git pull origin <BRANCH_NAME>
4
SOLID INDIA CAPABILITY DOCUMENT
14. In bitbucket create a pull request for this branch
15. if there are no conflicts and no errors then pull request will be approved
feature branch will be merged with Master
$ git checkout master
$ git pull
$ git pull --no-ff origin <FEATURE_NAME>
$ git push -u origin master (-u only for the first time)
5
SOLID INDIA CAPABILITY DOCUMENT
GIT REPEATITIVE WORKFLOW PROCESS
1. If two people are working on the same feature the branch name should be same.
For New feature checkout to new branch
$ git checkout -b <FEATURE_NAME>
2. Make changes and once all the changes are done add all files to staging and commit
if we have made changes in front end then build files in production Environment before
commiting
$ npm run prod
$ git add .
if we haven't pushed the changes to remote repo and we want to reduce number of commits
then we can use git amend . Amend will overwrite previous commit id with new id and will
add current changes into previous commit. Then you can edit previous commit message
$ git commit --amend
5. Checkout to the feature branch which we want to push to the remote repo
$ git checkout <FEATURE_NAME>
6. If remote feature branch is updated then first pull those changes into your local feature branch.
$ git pull origin <BRANCH_NAME>
6
SOLID INDIA CAPABILITY DOCUMENT
9. if there are no conflicts and no errors then pull request will be approved
Make require changes and commit and push it to remote branch follow step 14 and 15
Automatically commit will reflect in pull request no need to create pull request
7
SOLID INDIA CAPABILITY DOCUMENT