@systemdesign42
Neo Kim
5 months
Git has 152 commands. But most people don't use the most powerful Git commands. Here are 4 must-know Git commands that will help you:
5
35
215

Replies

@systemdesign42
Neo Kim
5 months
4) git stash It lets you make different code changes to fix a bug without creating many local branches. You can save uncommitted changes in the stash and apply them later.
1
0
8
@systemdesign42
Neo Kim
5 months
3) git blame It lets you find who and what caused the change. And helps you debug faster.
1
0
6
@systemdesign42
Neo Kim
5 months
2) git add -i It lets you stage only the lines of code that you want. Also it allows you to squash and remove commits. Besides avoid "git add ." like the plague because you don't want to break the deployment with unwanted code.
1
2
10
@systemdesign42
Neo Kim
5 months
1) git bisect It lets you do a binary search to find the commit that caused the bug. And helps you debug faster.
3
0
14
@systemdesign42
Neo Kim
5 months
What would you add to this list? Also I write a weekly newsletter to teach system design. Try it with 30,001+ readers:
3
0
1
@systemdesign42
Neo Kim
5 months
If you liked this thread. ๐Ÿ”” Follow: @systemdesign42 โ™ป Repost to help others find it. ๐Ÿ’พ Bookmark it for future reference.
0
0
0
@Franc0Fernand0
Fernando ๐Ÿ‡ฎ๐Ÿ‡น๐Ÿ‡จ๐Ÿ‡ญ
5 months
@systemdesign42 git bisect is a powerful one
1
0
3
@systemdesign42
Neo Kim
5 months
0
0
1
@SmithCommaDave
Dave Smith
5 months
@systemdesign42 I have been using git for the last 7 years. Never even heard of git add -i. Tried it. I donโ€™t know how I went this long without it. Thanks!
1
0
2
@systemdesign42
Neo Kim
5 months
@SmithCommaDave oh, it's a handy tool.
0
0
1
@lynnsamsara
lynn zhang
5 months
1
0
1
@whoami405
Who Am I
5 months
0
0
0