-
Notifications
You must be signed in to change notification settings - Fork 6
Git
Since we are using GitHub as our main collaboration tool, it's mandatory for each of us to understand the fundamentals of Git. Please familiarize yourself with these Git operations and their fundamental concepts:
commit
branch
merge
rebase
reset
revert
clone
fork
bisect
If you don't know what those Git operations mean, just ping me in the group chat so I can help you explaining them.
Here are a few free resources that might be useful to help you learning Git fundamentals:
-
Git Best Practices.pptx
A presentation slide that I used to explain some of those concepts into my subordinates in my past workplace. -
Think Like (a) Git
A website explaining the basic concepts of Gitcommit
&branch
in a simple way. -
Learn Version Control with Git
A comprehensive Git tutorial by Git Tower, a paid Git client. Also available in the video format. -
GitHub Learning Lab
An interactive tutorial by GitHub for learning basic Git operations, includingfork
. - Atlassian Git Tutorial A comprehensive Git tutorial by Atlassian. Its Collaborating section is pretty useful to help us understand the complexity (or the simplicity 😁) of collaboration through Git.
Since I have never met most of the collaborators prior to this project initiation, I want to make sure that all of them are accountable of the codes they contributed.
Therefore, I decided that it is mandatory for the Pull Requests to be merged to only contains commits with verified signatures. If you accidentally committed an unsigned commit, you can try to rewrite the Git commit history. Just reach out to me, I will be glad to help you if you get that kind of problem.
This guideline applies to all manual commits.
- Separate subject from body with a blank line
- Limit the subject line to 50 characters (exclude tags)
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
In the event of special case, you will need to indicate in the title line and explain what are the potential impacts.
Special cases and tags:
- Breaking changes - [Breaking]
- New Features [New]
- Bugfix [Fix]
- Refactor - [Refactor]
- Deprecation - [Deprecate]
- Fix PR comment or code cleanup - [Clean]
- Adding/updating tests - [Test]
Note: We should use merge commit to aggregate multiple commit messages. Commit message usually contains the ticket number in the branch name, so we do not require it in the commit message.
[Breaking][new] Use a more secure hashing algo for password :boom:
This may affect services that cache password hash for authentication.
Changelog for 21st March 2019
[Refactor] Merging Tim’s spaghetti branch
Why?
It’s a frequently requested type of pasta
It makes the code more tasty
[Breaking] Changed the password hashing algo to bcrypt
As opposed to what we were using originally which was plaintext. The legal department forced us to rush this but jokes on them though! The DB is not password protected.
---
Changelog for 22nd March 2019
[Refactor] Refactoring PayPal payment gateway code to improve stability.
---
Changelog for 30th March 2019
[Deprecated] POST /shippers/:id/top-up/paypal is now deprecated
Because the previous engineer who wrote it, redirected the PayPal payment to his own account.
Further readings: https://chris.beams.io/posts/git-commit/ https://wiki.openstack.org/wiki/GitCommitMessages https://gitmoji.carloscuesta.me/
I don't always
push --force
, but when I do, I usepush --force-with-lease
-–force
considered harmful; understanding git’s -–force-with-lease
- React Hooks
- Gatsby
- Data Visualization
- Continuous Integration
- To the project
- To this wiki