Git Guide for Dummies
This simple Git guide is satire and not meant to offend anyone. If you are a dummy or a beginner to using Git this might actually be helpful to you and work as a cheatsheet (I sometimes visit this post when I forget a command).
- Get my shit.
- Send my shit.
git add <filename>
- Track my new shit.
git add --patch
- Let me choose the new shit to track.
- This shit is good for now.
- Get the new shit.
git checkout -b <branch name>
- I'm going to work on my shit over here for now.
git checkout <branch name>
- I'm going back to this shit.
git merge <branch name>
- Mix that shit with this shit.
git checkout --theirs
- That shit is better than this shit, fuck this.
git checkout --ours
- This shit is better than that shit, fuck that.
git commit --amend
- I need to fix my shit.
- Let's look at this shit.
- I need to know my shit.
git rm <filename>
- I don't need this shit.
git commit --fixup=<commit hash> (or --squash)
- Here's some new shit to fix some old shit. I'll rebase it later.
git rebase -i [--autosquash] <old commit>
- Are you dumb?
- No, Let's clean this shit up.
- Yes, Just fuck my shit up.
Knowing how to use these Git commands is mostly all you need for a good Git workflow. Happy programming.