Skip to content

Instantly share code, notes, and snippets.

@josephgoksu
Last active December 11, 2018 08:39
Show Gist options
  • Save josephgoksu/415d826070eee517b7c74423b1b43f04 to your computer and use it in GitHub Desktop.
Save josephgoksu/415d826070eee517b7c74423b1b43f04 to your computer and use it in GitHub Desktop.
Awesome Git

Git Branch Naming Conventions

<type>/<name>

<type>

bug    - Code changes linked to a known issue.
feature - New feature.
relase - New Release.
fix/patch - fixes to the codebase.
hotfix - Quick fixes to the codebase.
misc   - other miscellaneous stuff
tests  -  everything about test related
experimental - every experimental reseach (will never be merged).

<name>

Always use dashes to seperate words, and keep it short.

Suffix <JIRA_NO> (Optional)

Commit message convention

<Jira-issue-ID> <action-verb> <explanation>
<description (optional)>
Example
[ED-666] fix exported JS code from the data-click attribute
On scene reopening, path strings were manipulated by the pathHandler method. We had to ignore paths coming from JS code in data-click. A RegExp check now filters which paths should be manipulated.

Branch Examples

release/v3.1.4
feature/new-onboarding-screen
feature/new-unicorn-emoji-SV1002
hotfix/dockerfile-base-image
bug/login-ie

To delete all local branches that are already merged into the currently checked out branch:

git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d

Once you delete the branch from the remote, you can prune to get rid of remote tracking branches with:

git remote prune origin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment