hy.am studios

Git

*Here you’ll find out how we use GitHub in the studio. You can find all our project over there: github.com/hyamstudios

DISCLAIMER: As I was alone until then, I haven’t followed that workflow because it was simply a loss of time. I am open to any suggestion to better this workflow.*

Command Line vs GUI

As said before, you are free not to use command lines but a GUI for your use of git hosted on GitHub (Tower or Fork aren’t the worst).

If you were to use the terminal here’s the aliases I most commonly use:

  • a = add -A
  • co = checkout
  • ci = commit
  • di = diff
  • pl = pull
  • ps = push
  • pst = push –tags
  • fe = fetch
  • st = status
  • br = branch
  • logg = log –color –graph –pretty=format:’%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset’ –abbrev-commit
  • hist = log –pretty=format:\”%h %ad | %s%d [%an]\” –graph –date=short
  • type = cat-file -t
  • dump = cat-file -p

If you want to learn the terminal: try.github.io

Workflow

As the tech team was made out of one single developer until June 18’, the workflow might change with time and collaborative work.

The main idea is as of now, the following:

  • New branch from master
  • Each new branch should be given a suffix
    • feature/my-branch-name: used for new features only!
    • fix/my-branch-name: used to apply fixes on existing features
    • test/my-branch-name: used to do some random testing and should most definitely not be merged under any circumstances into master (your pull request will be denied anyway)
  • Do some coding
  • Open a pull request and add a reviewer
  • Review/Comment where needed
  • Merge into master if your code is worth being merged

Please never work on master (we will lock it anyway)

Pull Request

When you open a pull request you should always

  • Be sure of what you are pushing
  • Give an accurate description of your changes. Think about others that might not know the code and need to understand it.
  • If the pull request should not be merged just yet, add a WIP label to it so everybody knows.

⚠️ We are not using a workflow just because it’s sounds cool! The point here is for everybody to have a better understanding of the code and make sure we all agree on what’s being pushed.

Questions? Please contact the author for this page:

Martin - Frontend Developer

Updated on: 29th October, 2018