2019 iT 邦幫忙鐵人賽


Day seven
Why Git is so much required?

Hello everyone, it’s Ray. Today I’m going to share why Git is so a lot required.
大家好我是Ray! 今天要跟大家分享,為什麼要使用Git?

Firstly, have you once encountered that situation that something comes up when you are coding, it could be that your mom calls you, or even more serious that you forget to pick up your girlfriend.

Unfortunately, at that very moment you happens to do debugging or develop a new feature.

When you finally get some free time to proceed your coding, holly shit… something goes wrong! It’s hard to debug among a sea of code especially when you don’t know where to start.
當你終於有空回去繼續coding時,靠!怎麼出錯啦~? 滿滿的程式碼滿滿的邏輯不知道從何找起從何debug起~

Or, sometimes when developing a new feature, unluckily it happens to affect the current feature and cause some error. When we realise that searching from nowhere might lack efficiency and want to go back to the moment when the new feature is not yet started, our good habit of saving file regularly just cover the light at the end of the tunnel.
又或者,有時在開發新功能時,新功能不巧地影響到現有的功能,導致現有的功能也無法使用! 當我們陷入一個無頭緒的狀態時,我們就想要回到還沒開始新功能的那一刻,很不巧的,我們早就已經養成定時存檔的良好習慣...

At this moment, we regret that we didn’t’ use git earlier.

When you encounter some emergency during coding, or you want to start a new feature based on current one that works, you could simply use git to save it, and after that you could go there whenever you need. Also, this kind of saving takes the precedence over the built in saving function of editors, or IDEs that you use. In other words, even though you’ve saved the file on your editor or IDE, you could still go back to the point that you saved with Git.

In other circumstance, except for the small project that you could complete on your own, it required multi-collaboration when it comes to a big project. Have you thought of how to efficiently collaborate with each other? After all, coding is sort of delicate work. One typo sometimes could keep the function from working properly.

At this circumstance we always use Git to do the integration. Imaging that you do your portion on your own computer, and upload to a mutual folder after you finish it. Other team member do the same thing, and Git could do the integration.

So to a coder, Git seems to be an integral tool.

OOP- Class and Object
Experience of a backend novice30