Coming in quick with another blog post! This is an updated version of my article from 2021 detailing my time-saving Git aliases. My aliases haven't changed much since then which says something about their utility! tl;dr - type `git s` instead of `git status` and save yourself precious keystrokes https://lnkd.in/ecXbVfyR
Benjamin Wilson’s Post
More Relevant Posts
-
Hat tip to Lauren Sheridan for sharing, with our Code the Dream community, this Git Rebase article by Chris Jones (of Viget). - Chris breaks down EXACTLY what a Git Rebase is in a simple manner. - He references the official Git documentation. - He then gives a real word example to demonstrate the concept. - Then he illustrates it with a diagram followed by concrete examples from that diagram. - He also goes into explaining the `--onto` flag and omitting certain commits from a rebase. As he wrote in his article, "[t]ake my hand and let's go on a trip through git rebase and unearth the secrets." Well done, sir. https://lnkd.in/eU92f4wP
To view or add a comment, sign in
-
Make Your Git Logs Beautiful & Readable! Let’s be honest—reading git log can feel like deciphering an arduous riddle. Here’s a simple yet powerful command that visualizes your Git log in a clean, structured format: git log --oneline --graph --all --pretty=format:"%C(yellow)%h %C(blue)%ar %C(reset)%s %C(green)%an" 🔹 What does it do? ✅ Shows a concise commit history ✅ Displays branches and merges in a graph ✅ Highlights commit hash, time ago, message, and author Want this always handy? [I bet you do] Add this alias to your ~/.zshrc file: Open .zshrc [will open this file in notepad] then add below command alias logs='git log --oneline --graph --all --pretty=format:"%C(yellow)%h %C(blue)%ar %C(reset)%s %C(green)%an"' Now, just type logs in your terminal to get a clean, structured Git log every time! 🎯 Try it out & let me know—does this make your life easier? 🚀 #Git #SoftwareEngineering #DevTips #Productivity
To view or add a comment, sign in
-
Simple implementation of Git Client In Go from Coding Challenges - Initialize a repo - Add File(s) - Make commit(s) - Show status - Show changes between commit(s) - Show commit(s) logs https://lnkd.in/dVD6fg7K #go #golang #gitClient #codingChallenges
To view or add a comment, sign in
-
GIT COURSE 2 (11 more chapters) is live! ThePrimeagen (multi-billion) put a TON of work into this one. If you're still a non-rebase-enjoyer because you're worried about weird conflicts and force pushing, this course is for you. Link in the reply. Use code PRIME for 25% off a boot dev membership. Here's the chapter breakdown of both Git courses. Git 1: 1. Setup 2. Repositories 3. Internals 4. Config 5. Branching 6. Merge 7. Rebase 8. Reset 9. Remote 10. GitHub 11. Gitignore Git 2: 1. Fork 2. Reflog 3. Merge conflicts 4. Rebase conflicts 5. Squash 6. Stash 7. Revert 8. Cherry Pick 9. Bisect 10. Worktrees 11. Tags enjoy, and thanks again to Prime
To view or add a comment, sign in
-
-
✨What's New in Git 2.45? Git 2.45 brings several exciting updates: 1. Reftable Backend: Reftable-powered storage backend is now supported, offering flexibility for reference storage. To try it, initialize a repo with `--ref-format=reftable`. 2. Reflog List Command: The new `git reflog list` command lets you view references with reflogs, even in reftable format. 3. Custom Diff Prefixes: You can customize diff prefixes with `diff.srcPrefix` and `diff.dstPrefix`, allowing more context and potential terminal hyperlinking. 4. Cherry-Pick --empty Option: This new option allows you to specify how to handle empty commits during a cherry-pick, similar to `git rebase`. Check out the Git 2.45 release notes for more details! https://lnkd.in/gg9MnS6a #Git #VersionControl #GitUpdate #DeveloperTools #SoftwareDevelopment
To view or add a comment, sign in
-
-
𝗚𝗶𝘁 commands cheat sheet that developer must know Simple Git Workflow: 1. Initialize a Repository: 𝙜𝙞𝙩 𝙞𝙣𝙞𝙩 2. Make Changes/Modify files in your working directory. 3. Stage Changes: 𝙜𝙞𝙩 𝙖𝙙𝙙 <𝙛𝙞𝙡𝙚(𝙨)> 4. Commit Changes: 𝙜𝙞𝙩 𝙘𝙤𝙢𝙢𝙞𝙩 -𝙢 "𝙔𝙤𝙪𝙧 𝙘𝙤𝙢𝙢𝙞𝙩 𝙢𝙚𝙨𝙨𝙖𝙜𝙚" 5. Pull/Push Changes Pull changes from the remote repository before pushing. 𝙜𝙞𝙩 𝙥𝙪𝙡𝙡 𝙤𝙧𝙞𝙜𝙞𝙣 <𝙗𝙧𝙖𝙣𝙘𝙝_𝙣𝙖𝙢𝙚> 𝙜𝙞𝙩 𝙥𝙪𝙨𝙝 𝙤𝙧𝙞𝙜𝙞𝙣 <𝙗𝙧𝙖𝙣𝙘𝙝_𝙣𝙖𝙢𝙚> 6. Branching: Create a new branch for new features or bug fixes 𝙜𝙞𝙩 𝙗𝙧𝙖𝙣𝙘𝙝 <𝙣𝙚𝙬_𝙗𝙧𝙖𝙣𝙘𝙝_𝙣𝙖𝙢𝙚> Switch to that branch 𝙜𝙞𝙩 𝙘𝙝𝙚𝙘𝙠𝙤𝙪𝙩 <𝙣𝙚𝙬_𝙗𝙧𝙖𝙣𝙘𝙝_𝙣𝙖𝙢𝙚> 7. Merging: Merge branches when changes are ready to be integrated. Switch first to branch you want to merge 𝙜𝙞𝙩 𝙘𝙝𝙚𝙘𝙠𝙤𝙪𝙩 <𝙗𝙖𝙨𝙚_𝙗𝙧𝙖𝙣𝙘𝙝> Now merge the feature to base 𝙜𝙞𝙩 𝙢𝙚𝙧𝙜𝙚 <𝙛𝙚𝙖𝙩𝙪𝙧𝙚_𝙗𝙧𝙖𝙣𝙘𝙝> 8. Viewing History: 𝙜𝙞𝙩 𝙡𝙤𝙜 𝗕𝗼𝗻𝘂𝘀: Discard Changes in Working Directory: 𝙜𝙞𝙩 𝙘𝙝𝙚𝙘𝙠𝙤𝙪𝙩 -- <𝙛𝙞𝙡𝙚(𝙨)> Remove Untracked Files: 𝙜𝙞𝙩 𝙘𝙡𝙚𝙖𝙣 -𝙙𝙛 Stash your change for later use: 𝙜𝙞𝙩 𝙨𝙩𝙖𝙨𝙝 -𝙢 "𝙈𝙚𝙨𝙨𝙖𝙜𝙚" Use your stash: 𝙜𝙞𝙩 𝙨𝙩𝙖𝙨𝙝 𝙥𝙤𝙥 #linkedin #linkedinglobal
To view or add a comment, sign in
-
-
What is Git Stash? Think of Git stash as a storage area for your uncommitted changes. When you stash your work, it’s essentially put on hold, allowing you to switch branches or work on something else without committing. How to Use Git Stash: 1. Stashing Your Work git stash save "Your stash message" 2. Viewing Stashed Changes git stash list 3. Applying a Stash git stash apply 4. Deleting a Stash git stash drop stash@{1}
To view or add a comment, sign in
-
-
Instead of a commit ID, use `:/<keyword>` in git to refer to the last commit with “<keyword>” in its message.
To view or add a comment, sign in
-
🎭 Git Alias of the Day: The "Oops" Button 🙈 Ever wished for a time machine for your git commits? Well, wish no more! Introducing the "undo" alias. What does it do? It's like CTRL+Z for your last commit! 😱 Just type git undo and POOF! 🎩✨ Your last commit vanishes, but don't panic – your changes are safe and sound in the staging area, ready for a second chance at commit stardom. It's perfect for those "Oh no, I forgot to add that crucial semicolon!" moments or "Wait, did I just commit with a typo in the message?" scenarios. We've all been there, right? 😅 Remember, with great power comes great responsibility. Use it wisely, or you might find yourself in a never-ending loop of undo-ing your undos! 🌀 #GitTips #DeveloperLife #CodeHumor #TechHacks P.S. Who else thinks we need an "undo" button for real life? 🤔 Like for that time you ate that extra slice of pizza... 🍕
To view or add a comment, sign in
-
-
TIL: it feels great to share an advanced git technique I learned today: how to use git blame to find out the original author of codes after several file renames or refactors. 🍻 https://lnkd.in/gpUwvcMv
To view or add a comment, sign in