---
title: "Discussion on \"How NOT to use Git in Practice. Ten Git usages, you should know to avoid.\" | Hashnode"
description: "Discussion on \"How NOT to use Git in Practice. Ten Git usages, you should know to avoid.\". Git is a popular version control system. While you must know how to use it, it is equally important to know how NOT to use it! Learn the DON'Ts."
url: "https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How NOT to use Git in Practice. Ten Git usages, you should know to avoid.](https://blog.greenroots.info/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid?utm_source=hashnode&utm_medium=feed)

Git is a popular version control system. While you must know how to use it, it is equally important to know how NOT to use it! Learn the DON'Ts.

Jul 12, 2021 · 6 min read · blog.greenroots.info  
Updated Sep 30, 2022  
Read the article

-   [#git](https://hashnode.com/tag/git)
-   [#github](https://hashnode.com/tag/github)
-   [#programming](https://hashnode.com/tag/programming)
-   [#productivity](https://hashnode.com/tag/productivity)
-   [#beginners](https://hashnode.com/tag/beginners)

## Written by

[Tapas Adhikary](https://hashnode.com/@atapas)

@atapas · Bangalore

  
[View profile](https://hashnode.com/@atapas)

Educator @tapaScript | Founder CreoWis & ReactPlay - Writer - YouTuber - Open Source

Co-Founder, @CreoWis | Teacher, @tapaScript | Founder, @ReactPlay | YouTuber | Writer | Human

## Responses 5

Markdown supported · ⌘↵ to post

[Adtc](https://hashnode.com/@Adtc)

[Nov 6, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/6186ec4641f03514daf3f518)

A lot of this is subjective, depending on the organization and the project. These things are not set in stone and are not some holy rules that send you to Git Hell if broken. They're just guidelines for a sensible usage of Git in general but could be "not followed" in certain situations.

Also, as a fairly recent article it sounds outdated that you still call the main branch `master` when there's an active drive going on to rename it to `main`. :)

[Tracy Nuwagaba](https://hashnode.com/@tracycod3r)

[Jul 13, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60eda6df573c235ee63a38ae)

Great article. Thanks for sharing!!

[Tapas Adhikary](https://hashnode.com/@atapas)

[Jul 13, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60eda6df573c235ee63a38ae#reply-60edaa8e573c235ee63a3992)

Thanks, Tracy! Glad you found it helpful.

[Ayushi Rawat](https://hashnode.com/@ayushi7rawat)

[Jul 13, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ecf45e573c235ee63a0b8a)

Great article, well explained. [Tapas Adhikary](https://hashnode.com/@atapas),

[Tapas Adhikary](https://hashnode.com/@atapas)

[Jul 13, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ecf45e573c235ee63a0b8a#reply-60ecf620573c235ee63a0c5a)

Thanks, Ayushi.

[Marcos Brigante](https://hashnode.com/@marcosbrigante)

[Jul 12, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec6f1dfc37a15ec156190c)

Nice article, I would like to disagree with the "special master" point. I've been using trunk based development for several years and it is great:

[trunkbaseddevelopment.com](https://trunkbaseddevelopment.com/)

Keep the good work! :)

[Tapas Adhikary](https://hashnode.com/@atapas)

[Jul 12, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec6f1dfc37a15ec156190c#reply-60ec706efc37a15ec15619a7)

Thanks Marcos 🙂.

Just curious, the trunk based approach you are using with git or with other VCS like SVN?

[Marcos Brigante](https://hashnode.com/@marcosbrigante)

[Jul 12, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec6f1dfc37a15ec156190c#reply-60ec75e1fc37a15ec1561c91)

Hi [Tapas Adhikary](https://hashnode.com/@atapas), yes it is git, with a small team of 5 devs. Being doing it for 7 years now.

We don't do formal reviews or PR's, all the code is produced on pairs or overviewed by a senior dev at coding time and commited to trunk.

We are full CI/CD using jenkins, and the simplification of the VCS model (git in our case), with low branching or other tasks, leads to more time coding.

Have yet to test the model at a scale, but it works nicely here.

[Tapas Adhikary](https://hashnode.com/@atapas)

[Jul 13, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec6f1dfc37a15ec156190c#reply-60ecef48573c235ee63a0981)

[Marcos Brigante](https://hashnode.com/@marcosbrigante) Thanks for sharing, Marcos. With my team of 23, restricting master is the first thing we do 🙂. Great to know about your environment and usecase.

[Niranjan Borawake](https://hashnode.com/@niranjandb)

[Jul 12, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec4401fc37a15ec1560a88)

Great list, [Tapas Adhikary](https://hashnode.com/@atapas). Thanks.

Would like to add a couple -

1.  Always squash your commits w.r.t. _Don't make it bulky_ section.
2.  Do `git pull --rebase` when appropriate.

[Jul 12, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec4401fc37a15ec1560a88#reply-60ec4672fc37a15ec1560bfc)

Thank you, Niranjan.

These two additions sound great. Thanks a lot for sharing 👏.

[PFRouleau](https://hashnode.com/@PFRouleau)

[Jul 13, 2021](https://hashnode.com/posts/how-not-to-use-git-in-practice-ten-git-usages-you-should-know-to-avoid/60ebb92bc551f16b0f850097/comment/60ec4401fc37a15ec1560a88#reply-60ed99e0fc37a15ec1568267)

I tell to my teammate to always use "git pull --rebase" and to define a "pr" alias to make it short.

It should not be required if they follow the rule to never commit directly to a main branch, but there is always someone that does it by mistake and this prevents the creation of an unwanted merge.
