❗
|
Use terminal git, not the bloated GUI version. |
The workflow is as follows:
-
Pick an Issue
-
Update (or clone) the local repo
-
Create new local issue branch
-
Hack away
-
Commit and push to a new server branch
-
Create pull request
-
(Solve feedback)
-
Delete local branch
If you don’t have git and/or hub, run in Powershell with admin rights:
Set-ExecutionPolicy AllSigned
then
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install git hub -y
-
Clone if this is the first time modifying the codebase.
git clone https://github.com/CIMB-TEC/WebSite.git cd Website git fetch origin git checkout -b dev origin/dev
-
Create new feature branch
git checkout -b {your-name}/{place-where-issues-will-be-solved}
-
Begin making changes. Once finished, add, commit and push changes.
❗The commit message (the string between the quotes) should follow this format: {Changes} GH-{ISSUENUMBER} If the commit solves the issue, add "Solve" before the GH-Issue
git add * git commit -m '{COMMIT MESSAGE}'
-
Push & create a pull request with necessary info
ℹ️You can get the branch name using git branch
git push --set-upstream origin <branch name> hub pull-request -m "Solves #{issue-number} {and Solves {issue-number} and Solves...}" -m "{Description of changes}" -b CIMB-TEC:dev
At this point, you should wait for feedback. If there are changes to make, add, commit and push again but do not create another PR.
-
If your changes got accepted and merged into
dev
, delete your feature branch from local so next time you work you start clean.git checkout dev git branch -d <branch name>
-
When you are ready to tackle another issue, be sure to get the latest changes before you create a new feature branch from
dev
.git pull