You heard me.
Alright, that was mean lol. Though based on the title, you probably already knew the idea of this article.
Git was something we h...
For further actions, you may consider blocking this person and/or reporting abuse
Dude, I'm the same way. I switched to git because I was genuinely tired of clicking icons.
cuz
I'M A LINUX GEEK
I've grown to love the terminal. By the way, what does Silksong have to do with it?
HORNET IS GORGEOUS
ps make it full screen
Holy ASCII. That neat! I can't do CLI for anything because I like clicking apps lol. Though, it is nice to learn tbf. Great artwork btw. How u do that?
There's a cool site. It has nsf.. too... ahem, ahem.
A great ASCII art site. On a variety of topics. You can draw.
emojicombos.com
I've got some shortcuts like
gcforgit commit, andgclforgit cloneFor that, on Linux into
~/.bash_aliasesput :Quite Useful Thomas! I...
this when I was exploring git at some point. (Don't boo at me lol).
me after reading this post:
This is great post idea, Francis! 🤩 You inspired me, I'll write follow-up next week!
Thank Sylwia! Looking forward to it!!
It's always fun to learn a new git command <3
I have been using it since 3 years and everytime I make a mistake with my branch there is always a command to fix it !!
The best tool ever made by mankind LoL
Definetly. Thanks Risabh and
These are some of the git commands I frequently use. First:
Then it will print out something like this:
It is easier for me than
git logsince I sometimes I only want the overview of where am I at or sometimes when I messed something up and just want to go to particular commit hash.Second, sometimes the file you want to specifically add is nested way too deep and some of the folder/file names are long like this:
It got to a point that it was tiring for me so I tried pressing
Tabaccidentally I was surprised. It autocompletes if the first few letters is unique inside that directory. It made my life so easier and now I'm addicted to committing files that only covers my commit message.Last, which I think should be included in the basics for
gitwould be this:This is essentially pushing your branch towards a certain online repo's branch.
The
-ustands for upstream. It tells your local device to remember the last time where you push this code. So when you want to add more code in your branch you just do this instead:The
originis like the shortened term for a the repo link (which I think should also be essential in linking your local repo with the online repo):Then the
mainone is the branch where you want to drop off your code. But usually I won't suggest that. I would just simply use a different one:Essentially, this copies whatever branch you are in and pushes it onto the online repo without touching the main branch first.
I think I've explained some of the concepts horribly. I apologize in advance when something is inaccurate. But yeah, mistakes happen. Happy to learn more to
git gud.Thanks for the detail share Elmar! When I have time, will edit the article based on your suggestions! :D
Thanks for the article!
You can add also as a reference this game to get used to more neat git terms / concepts
ohmygit.org/
ooooo interesting. Will add it to this article. Thanks George!
Cool 😎, and your examples here funny too
Thanks man :D
The UI vs CLI framing is a good way to introduce Git, but there is one conceptual shift that makes Git much easier to understand: don't think of
git addas “tracking files.” Think of it as building the exact snapshot you want the next commit to contain.That distinction becomes important pretty quickly.
git restore .does not undo agit add .in the way many beginners expect; it restores working-tree files. For removing something from the staging area,git restore --staged <file>is the safer mental model.Once you understand the three states — working tree, staging area, and commit history — Git stops feeling like a collection of commands and starts behaving like a predictable state machine.
git statusis probably the most valuable command to build the habit around.I just finished Silksong this week so this is incredibly timely for me! Great post @francistrdev
Thanks Jem! Got back from my trip. How was it? The boss fight is crazy lol
Loved it! Some of those gauntlets had me screaming.... 😅
Hi Francis, great write up. A couple other commands I use often are
git checkout -b <branch-name>to create a branch then switch to it.git fetch && git rebase origin/mainto keep my feature branch up to date with the main branch.git cherry-pick <commit-sha>to move one commit from the develop branch to the main branch for any bug fixes.I’ve used Lazygit which is a terminal UI for git commands to make the commits. it’s nice to quickly see all your changes and what branch you’re on in your terminal instead of another app.
Thanks for sharing Shayan! Never seen the cherry-pick part of git, though it does make sense.
@francistrdev You're a wizard with images.😂 When are you going to teach me where you get all these graphics and animations?
One thing I need help with, though. Can you check if my newly published article got flagged again, or if my account got flagged? I don't see it under the Latest tab.
Thanks a lot.🙏
Hey Xuling! I appreciate it! I just basically search up images on Google and just go from there. I find images that are relevant to the post. For this case "Git Gud" comes from people interpreting Hornet saying that, even though the game designer did not intentionally make it that way (I think). Had this thought for a while now and I was eager to post this lol.
For your article, first time I seen it so I know I didn't touch it at all. Most likely a bug, but it seems people found your article either way. You could republish it, but it seems fine as you already have engagements and all. Do let me know!
I tried editing and republishing it, but the article still doesn't show up in dev.to's internal search. I also can't find it under any of the three tags I assigned. The only people who can see and comment on it are those who already follow me. This feels exactly like what happened a month ago😂. I remember my account got flagged back then, I think. Could you help check the status of my account? Thanks a lot.
It doesn't seem like I was the one who flagged it or touch anything since. Your account seems fine on my end.
Again, this happened to me once upon a time. It's probably most likely a bug if anything since flagging doesn't really mean it doesn't show up on the tag list. Those who are flagged or not can still posts and have their post listed in the latest section of the tag assigned. I would recommend waiting for a bit and try again in an hour or so. I tend to wait for a day or two just in case. I say this because it works normally after the one post, which is weird but it is what it is oof.
Okay, I'll just keep waiting then. Ever since my account got flagged last time, I've made it a habit to immediately check Latest after publishing anything, to see if it's there. When it didn't show up this time, I figured something was wrong. Thanks for checking it out for me. By the way, I was talking with a friend in the comments the other day about how it'd be awesome if dev.to had AI translation like Twitter, Facebook, and LinkedIn do. That'd be so much more convenient, lol. Really helpful for non-native English speakers like us.🤣
Sounds good!
For AI translation, that would be a good use of AI ngl. Having the articles translate to a different language is a nice to have. I know dev.to have languages set, but it's quite limited. You could make an Issue on GitHub about that as well since it might be a good idea to have that feature.
Nicely written @francistrdev .
Just a little correction, git checkout was used on legacy version of git whereas git switch is now the latest practice.

Thanks Tanay! Will update this post now :D
The useful test for “Git Gud!” is whether the lesson changes a team decision, not just a local implementation. I’d capture the failure signal, the guardrail that caught it, and the smallest regression test that keeps it from returning. That turns a good postmortem into something another team can actually reuse.
One command I’d definitely add for people moving from a GUI is git diff. git status tells you what changed, but git diff helps you understand the actual changes before staging them. That small habit can prevent accidental commits and also makes the transition from a visual Git client to the CLI much easier.
Good to know Glen! Thanks for sharing. Will give it a try :)
Haha great line 🤣
Nice Read :D
Thank and
on using Git lol. (Would love to see this image in the comments :D)
Okayyy, I’m getting the vibe that you’re really into pics and gifts very Gen Z of you.
Good rundown. Rebase vs merge tripped me up longest - took a mangled branch history to actually get interactive rebase. Wish I'd had this early on.
Great content. This kind of data-driven analysis is rare in the dev community. We need more posts like this.
git checkout -b existingBranch will create a new branch and switch to it at the same time :)
Ohhh I see thank you Ina. Will update it accordingly :)
The option -b does the magic
wins from this week for
NizamandMantiqprogramming Langauges:Wrong thread my guy but nice wins overall lol
Git is a rite of passage I felt this in my soul. 😄
My first merge conflict? I just closed the terminal and went for a walk. Came back and realized Git wasn't the enemy I just didn't trust it yet.
Your line about Git being a safety net, not a trap is the mental shift every dev needs.
Great one Francis. 🙏