Skip to content

Instantly share code, notes, and snippets.

@azharuddinkhan3005
Last active October 22, 2018 22:11
Show Gist options
  • Save azharuddinkhan3005/baf30895418f059cb8e42d047b51d68b to your computer and use it in GitHub Desktop.
Save azharuddinkhan3005/baf30895418f059cb8e42d047b51d68b to your computer and use it in GitHub Desktop.

Before we start any of the operations after you do vagrant ssh(after going inside the guest system) please run these two steps

git config --global user.email "<your github email ID>"
git config --global user.name "<your github username>"
  1. We need to have the workflow in conjunction with GitHub.(https://github.com/srijanaravali/gcmarketplace)

  2. When we go to our local repository and run git remote -v then we get this

origin	git@github.com:srijanaravali/gcmarketplace.git (fetch)
origin	git@github.com:srijanaravali/gcmarketplace.git (push)

So this means we have only one remote added which is the GitHubs's one.

  1. Now we need to sync the github's remote master branche. So for that we need to do the following
git pull origin master
  1. Need to pull in the develop and stage branches from github's remote.
git fetch origin
git checkout develop
git checkout master
git checkout stage

This ensures we have github remote's develop and stage branch on our local so now switch back to the master branch (git checkout master).

  1. Now for developing your ticket firstly create a new branch while being on master.

(All new branches should be made from master)

Suppose the ticket that you are working on is GC-89 then create a new branch with the name GC-89 by

git checkout master
git checkout -b gc-89
  1. After you have done all your development on this ticket add all the files to be commited, commit all the files to be commited and lastly push this ticket to GitHub
git add <your files>
git commit -m "<give a proper comment>"
git push origin gc-89

Please follow this commit commenting pattern.

Ticket #<Ticket number> <Your comment.>

Example:

Ticket #GC-89 This is my test comment.

  1. Then go to your GitHub repo on browser (https://github.com/srijanaravali/gcmarketplace) and there you will be prompted to create a pull request (PR) (click on the Compare & Pull request). After clicking on the Compare & Pull request button we will be taken to another page where we will be given a button to Create pull request. Click on it and your pull request will be created. Then assign it to a Reviewer.

  2. Then in order to unit test our changes on azure we need to merge github's ticket (in this case it is gc-89) branch into develop branch.

git checkout develop
git pull origin gc-89
git push origin develop

Then goto https://pttgcdevelop.azurewebsites.net/ to test your changes.

  1. Then in order to QA our changes on Azure we need to checkout to the branch stage and pull all the changes made in your ticket(GC 89) into this branch and push it to GitHub
git checkout stage
git pull github gc-89
git push origin stage

Then goto https://pttgcstage.azurewebsites.net/ to test your changes.

  1. Once the QA approves it your ticket will be merged into GitHub master and consequently to Azure's prod.

NOTE!!!

Before committing your code if you have added/edited any custom files(ignore the configuration and auto generated files) then we need to check for standards!
If we have added/edited any custom SASS files then to check the standards of that file run
scss-lint <path/to/your/file>
If we have added/edited any custom files(PHP/Drupal related) then to check the standards of that file run
drupalcs <path/to/your/file>

drupalcsp <path/to/your/file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment