#Overview - setting up our git workflow
This set-up works for our team as we don't mind pushing directly to a development branch, but this wouldn't work for other companies as the development branch could potentially get broken fairly quickly and with multiple developers working on this singular branch would be awkward to locate issues and fix - but for a small team this seems to work fine.
##Initial User Set-Up The first developer to work on the new project will go through this process:
-
<github>
Create repository on GitHub company account -
<local>
Create folder and initialise repo:git init -
<local>
Add remote:git remote add origin <path/to/repo> -
<local>
Stage, Commit & Push a README file toorigin -
<local>
Create adevelopmentbranch:git checkout -b development -
<local>
Stage updated README, Commit & Push thedevelopmentbranch to GitHub:git push origin development
##New User If another member of the team wants to work on this repository then they'll follow this process:
-
<github>
Find the SSH url to the repo -
<local>
Clone the remote repo using the SSH url (notice onlymasterbranch is visible) -
<local>We need to track the remote branchdevelopment:git checkout -b development origin/development -
<local>Now we're on thedevelopmentbranch we can make our updates. -
<local>Stage, Commit and Push todevelopmentbranch:git push origin development