6 Handy Git Commands

when it comes to web development, im a traditionalist with certain things. homemade components. 𝘱𝘢𝘳𝘦 css layouts. solving merge conflicts on vim. some call it inefficient, but sometimes it’s nice to write stuff manually in a field that can sometimes feel so automated. β € also, github gui confuses the hell out of me so here’s old lady angela coming straight at ya with 6 of my π™›π™–π™«π™€π™§π™žπ™©π™š π™œπ™žπ™© π™˜π™€π™’π™’π™–π™£π™™π™¨:

πšπš’πš πšŒπš˜πš–πš–πš’πš --πšŠπš–πšŽπš—πš

great for squashing staged files into your last commit - perfect for someone like me who will commit β€œWIP” every two hours and end up with a 70 line commit history (@imsaurabhchavan can vouch for this)

πšπš’πš πš›πšŽπš‹πšŠπšœπšŽ -πš’ 𝙷𝙴𝙰𝙳~4

interactive rebase allows you to pick and choose which commits you can pick, squash, reword, edit, or fixup. heads up, you’ll need noob vim knowledge to use this

πšπš’πš πš•πš˜πš -5 --πš™πš›πšŽπšπšπš’ --πš˜πš—πšŽπš•πš’πš—πšŽ

prints the last 5 commits neatly on the terminal - you can change this number to anything

πšπš’πš πšœπš‘πš˜πš›πšπš•πš˜πš -πšœπš—

pretty cool command that lists all users who contributed to the repo and sorts by commit counts

πšπš’πš πšπš’πšπš --πšœπš‘πš˜πš›πšπšœπšπšŠπš "@{0 𝚍𝚊𝚒 𝚊𝚐𝚘}"

command that shows how many lines of code you have written today

πšπš’πš πš•πš˜πš -πš‚ πš–πš’πš…πšŠπš›πš’πšŠπš‹πš•πšŽ

looks for the addition or removal of a word (in this case, myVariable - you can change this to anything) in a commit but not in a commit message

Original Instagram Post: https://www.instagram.com/p/B_BNdYQn2oH/