#git reset
Explore tagged Tumblr posts
Text

Use Git if: ✅ You need speed and distributed development ✅ You want better branching and merging ✅ You work offline frequently
#git tutorial#git commands#git basics#git workflow#git repository#git commit#git push#git pull#git merge#git branch#git rebase#git clone#git fetch#git vs svn#git version control#git best practices#git for beginners#git advanced commands#git vs github#git stash#git log#git diff#git reset#git revert#gitignore#git troubleshooting#git workflow strategies#git for developers#cloudcusp.com#cloudcusp
1 note
·
View note
Text
Obsessed with Pampering you
Pairing: Draco x Fem!Reader
Word count: 1,818
Warnings: smut
Summary: reader has had an impossibly long day, so Draco pampers her by making her come with just his hands.
It had been a long day. Classes, quidditch, homework, projects, and it was about to be an even longer night. It was the last day before winter break, and most of the students had left to go home already. You were looking forward to having the girl’s dorm all to yourself this holiday, but first you had to meet with a 3rd year student whom you’d been tutoring in potions at Snape’s request all semester. You knew it wasn’t going to be a quick study session either, this student was overwhelmingly behind on his assignments. You stood under the hot water of the shower wishing more than anything you could just crawl into bed after this. It was the middle of winter and the castle was freezing. It just made you want to close the curtains of your dorm’s bed, cuddle up with a good book and a hot tea, and stay there for days.
Reluctantly, you stepped out of the shower, wrapped yourself in a towel, and walked into the empty dorm room. As you approached your bed, you jumped a bit in surprise. “Draco?” He jolted awake and sat up yawning.
“Finally, you’re out. You take longer showers than the whole of Slytherin house combined.” You smirked and rolled your eyes. He had come into your dorm, yet of course the first thing out of his mouth when he wakes up is a complaint about you.
“Sorry to keep you waiting, glad to see you made yourself comfortable.” You joked. He snorted.
“What are you doing here?”
“You have my transfigurations notebook. I need it back.”
Draco was always making excuses like this to come and see you. He was too proud to just say ‘I missed you, and I needed your company’. In fact, he’s pulled this trick once or twice before today, purposefully lending you a book or something just to come into your dorm later claiming to need it back, only to end up spending hours with you and forgetting to take the book with him when he eventually left. He was a stubborn and proud asshole, but you loved him for it. The truth was, he did need your company. More than you knew. and you were happy to spare his pride and play along with his stupid excuses to spend time with him. He might not be good at communicating it, but these times with you made him the happiest person in the world. It reset him after long and dark days.
“It’s in my backpack in the common room. I’m about to leave to help Reid with his potions homework, you can walk out with me and get it then.” You told him. He looked disappointed.
“You’re joking, it’s the last day before break, he can’t expect you to help him now!” He said sitting up and looking angry. You shrugged and rolled your eyes. “I know. But he needs the help. And Professor Snape is holding me to these tutoring lessons.” You said, lying your head and body on the edge of your bed, letting your legs hang over. The minute your body hit the sheets, you felt like collapsing. “I’m so tired.” You said.
“You look exhausted.” Draco said, brushing some hair from your face, then scratching your scalp lightly with his fingertips. You hummed at the little head scratch, allowing your eyes to close for just a moment. “Tell him you’re not going. Tell him you’re sick, or you hit your head during quidditch practice and can’t think straight.” He said, now pulling you up fully onto the bed and lying you in between his legs. You let your back rest against his chest and melted into him as he continued to massage your head.
“I can’t do that, he’s probably on his way to the library now.”
“So? That little git can figure out his damn homework on his own. Anyway we both know you could use the rest, y/n”. He dragged his fingers gently down your shoulders and arms, and slowly began placing lazy kisses on your jawline. He was right. You did need the rest. His tone softened. “Come on, stay in bed, I’ll go tell him you’re sick and bring you up some tea from the kitchen.” He said softly in your ear. You knew it wasn’t a good idea, that Draco probably wouldn’t be overly polite to a third year Gryffindor who had been taking up a lot of your time recently, but you couldn’t resist anymore. Not when Draco was offering to pamper you like this. You loved when he was in a clingy mood. It wasn’t common, but sometimes he just needed to be with you, and in those times, all he wants to do is spoil you rotten. Maybe you needed his company as much as he needed yours right now.
“You’re the best” you say, finally giving in. He gives you a kiss on the cheek then gets up and quickly fixes his hair.
“I’ll be quick. Don’t move.” And with that he was gone. You sprawled out on the soft bed and began to doze off. You woke up to the soft sound of a teacup clinking against the nightside table, and Draco quietly shuffling back into his place behind you, lifting your body and pulling your back into his chest once again. You hummed when he once again began massaging your head and lightly scratching your scalp. He placed a long and loving kiss on your cheek, then began kissing down your neck as he lightly scratched down your arms. A soft moan left your lips and he slipped his arms under yours and pulled you into a tight hug against him. He disconnected his lips from your neck to say “I love you y/n”. Then placed another long, sweet kiss on your cheek.
“I love you too Draco” you said as you reached up to your chest and began unraveling your towel. Draco’s eyes widened as he looked down at your freshly cleaned naked body and you felt him hardening underneath you. “Please keep touching me?” You begged softly.
“I’ll keep touching you as long as you let me y/n.” He whispers in your ear. You shudder at his warm breath against your skin as one of his hand gently cups your breast, and the other feels down your toned stomach, onto your thigh, and slowly feels back up, just barely grazing your core before slowly feeling up your abs, past your other breast, grazing its nipple, then landing on your chin and gently turning your head to face him. You let out a small whine when your lips connect, and you feel him smirk against you. Cheeky bastard. With his other hand, he lazily circles your nipple with his fingers before finally cupping your breast and dragging his thumb over the nipple. You let out a breathy moan as you start to buck your hips into the air, feeling yourself clench around nothing. “Please?” you whispered to him.
“Please what?” He asks, continuing to gently play with your nipple with one hand and caress your inner thigh with the other. He was so so close to where you needed him.
“Please touch me Draco” you said bucking your hips, trying and failing to feel his hand on your core.
“I am touching you.” You could hear his smirk. You whined
“Please Draco, PLEASE touch my cunt, I’ve been thinking about you all day, I want you to feel how wet I am for you” you say. Draco moans and you feel his erection twitch against you.
“Since you asked so nicely” he said and finally slid his hand onto your core.
“Oh” you whined as he collected your wetness in his fingers and started rubbing torturously slow circles on your clit. You whine and start bucking your hips up into his hand, desperate for more friction. He grasps your thigh to still you and says “relax love. I always take care of you, don’t I?”
“Mhm” you moan out as his hand begins circling faster on your clit.
“Don’t I?” He says moving faster but decreasing the pressure. You whine and once again buck into his hand, unable to stop yourself.
“Yes Draco, no one can take care of me the way you do. No one could ever do the things that you do to me” you say. You hear a soft, barely contained moan escape his lips at your words as he finally applies more pressure, and starts circling your clit at a rapid pace. Your eyes close and your head falls back into his shoulder. You moan as he kisses and nips at the column of your throat. He moves his middle finger down, and slowly circles your hole, teasing you, while keeping a steady pace on your clit with his thumb. You gasp and buck your hips up into his hand. “P-please?” Is all you could manage to say between breathy gasps, but that was all he needed to hear from you this time. He plunged his long finger up into you and you gasped. You couldn’t help but squirm against him as his finger found the magic spot within you and pressed on it again and again in perfect time with his thumb which was still gently circling your clit. Your breaths became uneven and you felt the coil tightening. “Please…I’m s-so close” you whispered into the soft pale skin of his neck. You felt him swallow and could feel him slightly bucking his erection into your back, desperate for some friction, but unwilling to stop doing what he was doing when you were so, so close for him. You were so pretty when you came, he would do anything in the world to watch you come all over his fingers. He grunted at the sound of your moans, the feeling of your walls beginning to tighten around his fingers. He bit down on your neck, lightly sucking on you and you came hard all over his fingers. You were a moaning mess clenching him over and over and over again, wanting to keep him inside of you for as long as possible. Wanting to feel this connected to him forever. He helped you ride out your high until you were jolting at his touch from sensitivity. Draco hummed contently and brought his fingers to his mouth, tasting you, savoring every last drop of your wetness. It was the most delicious taste in the world to him. He reached down and you shuttered as he gently collected more from your cunt and once again sucked his fingers clean. You rolled over to face him and gave him a soft, long, sweet kiss. “I love you, Draco. You’re amazing in every way.” You said before snuggling up against his chest and drifting off as he begins to gently scratch your scalp. “You deserve the world, y/n”. Was the last thing you heard before he softly kissed your head and you fell asleep on top of him, knowing that you would pay him back in the morning.
#draco x reader#draco malfoy#harry potter#draco smut#draco lucius malfoy#draco malfoy smut#x reader#Draco x reader smut
93 notes
·
View notes
Text
ok enough twewying out for today. stopped around the beginning of day 4, after catching up to beat and rhyme. so! thoughts under the cut:
I'm completely addicted to this game's battle system. mind you it took me a WHILE to figure it out (i used to switch back and forth between neku and shiki after every combo in the beginning and never understood why i kept getting E rank before i realized i had to use them simultaneously) and then a while longer once i did to as they say "git good", but now I'm just tearing through enemies like paper. i love this shit. especially now that they let you queue fights together. i always clear an area of all noise the first time i enter it, even though it's gonna reset immediately after i leave and come back. grinding them is so much fun
new mechanics! memes! I don't know whether to make an internet joke or an SCP foundation joke. i was wondering when the random snippets of conversation were going to become relevant. i like that not all of the thoughts you gain are relevant for the mission, really gives you an incentive to fuck around and explore. also shiki should meme implant her period cramps into neku's brain, she's earned it at this point.
very amused by the clothes brand debuff system. from the pace it introduced the battle mechanics with, to the pin system, to the food, and now clothes trends, it's obvious that twewy is a very dynamic game in terms of strategy and item systems and it tries to get you to cycle through them to their fullest extent, as well as engage with its shops and money system. It's sure different from a lot of games I've played before! I'm very intrigued. it's pretty fun so far, nice way to keep me on my toes. it also 1) fits diegetically with the look and style of the game and 2) allowed for some cute character moments for shiki (she's so passionate about it!) and neku (get this autistic kid out of here please)
absolutely delighted by beat and rhyme every time they're on-screen. can't wait to see more of them now that we've officially teamed up. shiki becomes more and more interesting with every scene... is it doomed yuri i smell on her? god i hope so. neku amnesiac reveal made my opinion on him take a big leap forward, but he's also gotten progressively less insufferable all around. his shitty comments towards shiki have grown sparse enough that I've finally had the space to find his other scenes endearingly tsundere (and then he insults her again out of the blue and i go back to wanting to beat his ass). oh well. it's gonna end at some point. he's made progress at least.
"ready to die?" "then die!" is such a cute sync catchphrase. pinching their cheeks. i also like that they call out for each other when injured in battle, man i wish that vibe extended to their dynamic outside of battle as well.
players temporarily give up the most important thing to them when they enter the reaper's game, huh? i wonder if for shiki that was her best friend. and for neku his... memories maybe? or something else that would inevitably result in amnesia. if that's the case that tells of a character that is extensively defined by his past and looking backwards. that would sure be a cool setup. we'll see!
21 notes
·
View notes
Text
new chapter posted of my tomarry time-travel AU! the fic features: tom riddle’s third-person limited POV (if you like your narrators unreliable and sadistically bitchy, come ‘n git it), a 1940s setting, and a frankly sacrilegious amount of biblical imagery (i read paradise lost and made it everyone else’s problem).
this chapter features: gleeful descriptions of blood loss, hogwarts needing to reset the sign that proudly displays how many days since the last child was gravely injured while trying to get an education, and a devil getting what it loves best: a deal.
30 notes
·
View notes
Text
I know I don’t have a lot of programmers following me
But me and some friends a d colleagues just workshopped the git fucker 9000
git fetch && git checkout master && git branch —list -r | sort -R | xargs -L1 'git merge —strategy=ort —strategy-options=theirs -q —squash' && git reset $(git rev-list --max-parents=0 HEAD) --soft && git add -A && git commit --amend -m "lol, lmao even" && git branch --list | xargs -L1 'git branch -D' && git branch --list -r | xargs -L1 'git branch -D -r' && git push -u origin master -f
Do not run this
20 notes
·
View notes
Text
No but genuinely I genuinely cannot stress enough how badly I want more Lunara lore. I want to know about the resets. I want to know more about their Eclipse. I want to know about their Sun and Moon. I want to know about the handful of survivors left. I want to know how many alien civilizations they've treated the exact same as humanity. I want to know their inner turmoil. I want to know if they ever once hesitated before killing someone. I want to know their weaknesses. I want to git some nitty gritty and even if we can't get some like that, I still want more than what we have now. or else i'll die. badly
#xero says things#okay jts 5 am i need to sleep BUT I#LL STILL BE THINKING ABOUT THEM .#VAs if u hear me . lunara extras. please ...... lunara extras for a poor lost soul HDJSD /silly#sun and moon show#the sun and moon show#tsams#evil lunar#lunara#lunarposting
24 notes
·
View notes
Note
Butchlander SFW 1-4 and NSFW 1-3 <3
Ohh thanks for this!
SFW
1)who cooks?
Neither its either take out, frozen/pre-made meals or personal cook, i can see Homelander doing his best martha steward impersonation and maybe figuring out how to cook a bit but frankly i dont think these 2 are good cooks... but if anybody will cook i think Butcher might make some beans and toast with cheese for brekkie once in a blue moon.
2)who its the messiest? The cleanest?
Controversial take but i think Homelander its the messiest, despite Butcher's depression pad initial appearance owning a lack of stuff isnt a sign of being messy, his house looks clean and organized when it could be littered with cans and shit everywhere but even then its prolly his depression/alcoholism causing a mess while Homelander has never clean after himself in his entire life he could throw his dirty tissues on the floor and by next morning it would be gone magically, i doubt he even knows who keeps his house clean and if he lost his cleaners he would notice solely bcuz stuff are piling up... heck he might just assume things just reset themselves in the morning.
So Butcher its the cleanest.
Their first argument as a couple will be something like this:
HL: what do u mean dishsoap doesnt go in the dishwasher! Thats stupid!
Butcher: Just shut up you git... MM i need help...

3)who fixest the vehicle after the a breakdown?
Butcher but he has homelander pointing the flashlight and he its crying bcuz Butcher would become a dad at that moment altho Homie will offer to call the RAA on the spot. Or buy him a new car.
Basically Homie and Butcher the entire time.

4)living space has a leak? Who fixes it?
Neither. I feel like Homie will lose his mind if he can hear a leak so he will call a repairman inmediately and Butcher... honestly i dont think he knows how to fix a tap like thats just a recipe for disaster and he probably calls MM or Frenchie for help.
NSFW
1)how often do they have sex? If at all?
I think at first Homie might try 2 be conservative but he is so touched starved that he will be on Butcher dick multiple times a week. If anything Butcher might ask him to calm down a bit.
Like to me Homie will use sex as a form of reassurance that Billy still loves him and wants him while Billy its more normal and spontenous about it but even when they finally come to an agreement i would say once a week with lots of mutual wanking or cockwarming... like Billy will be watching the TV with his dick in Homie's mouth and not much else.
2)who brings ideas? Who initiates?
Butcher will bring the kink into the bedroom like he defo has a sadistic side and knowing Homie can handle it will drive him nuts with lust. But Homie starts normal-ish sexy time most of the times...
3)any kinks they clash on?
The milk thing and anything involving flying.
It be funny at first but Butcher wont like it if its becomes a regular sex act.
I also think sensory play will be difficult for Homelander he might just do it to keep him happy but not actively persue it.
47 notes
·
View notes
Text
GitHub and Git Commands: From Beginner to Advanced Level
Git and GitHub are essential tools for every developer, whether you're just starting or deep into professional software development. In this blog, we'll break down what Git and GitHub are, why they matter, and walk you through the most essential commands, from beginner to advanced. This guide is tailored for learners who want to master version control and collaborate more effectively on projects.
GitHub and Git Commands
What Is Git?
Git is a distributed version control system created by Linus Torvalds. It allows you to track changes in your code, collaborate with others, and manage your project history.
What Is GitHub?
GitHub is a cloud-based platform built on Git. It allows developers to host repositories online, share code, contribute to open-source projects, and manage collaboration through pull requests, issues, and branches
Why Learn Git and GitHub?
Manage and track code changes efficiently
Collaborate with teams
Roll back to the previous versions of the code
Host and contribute to open-source projects
Improve workflow through automation and branching
Git Installation (Quick Start)
Before using Git commands, install Git from git-scm.com.
Check if Git is installed:
bash
git --version
Beginner-Level Git Commands
These commands are essential for every new user of Git:
1. git init
Initialises a new Git repository.
bash
git init
2. git clone
Clones an existing repository from GitHub.
bash
git clone https://github.com/user/repo.git
3. git status
Checks the current status of files (modified, staged, untracked).
bash
git status
4. git add
Stage changes for commit.
bash
git add filename # stage a specific file git add . # stage all changes
5. git commit
Records changes to the repository.
bash
git commit -m "Your commit message"
6. git push
Pushes changes to the remote repository.
bash
git push origin main # pushes to the main branch
7. git pull
Fetches and merges changes from the remote repository.
bash
git pull origin main
Intermediate Git Commands
Once you’re comfortable with the basics, start using these:
1. git branch
Lists, creates, or deletes branches.
bash
git branch # list branches git branch new-branch # create a new branch
2. git checkout
Switches branches or restores files.
bash
git checkout new-branch
3. git merge
Merges a branch into the current one.
bash
git merge feature-branch
4. git log
Shows the commit history.
bash
git log
5. .gitignore
Used to ignore specific files or folders in your project.
Example .gitignore file:
bash
node_modules/ .env *.log
Advanced Git Commands
Level up your Git skills with these powerful commands:
1. git stash
Temporarily shelves changes not ready for commit.
bash
git stash git stash apply
2. git rebase
Reapplies commits on top of another base tip.
bash
git checkout feature-branch git rebase main
3. git cherry-pick
Apply the changes introduced by an existing commit.
bash
git cherry-pick <commit-hash>
4. git revert
Reverts a commit by creating a new one.
bash
git revert <commit-hash>
5. git reset
Unstages or removes commits.
bash
git reset --soft HEAD~1 # keep changes git reset --hard HEAD~1 # remove changes
GitHub Tips for Projects
Use Readme.md to document your project
Leverage issues and pull requests for collaboration
Add contributors for team-based work
Use GitHub Actions to automate workflows
Final Thoughts
Mastering Git and GitHub is an investment in your future as a developer. Whether you're working on solo projects or collaborating in a team, these tools will save you time and help you maintain cleaner, safer code. Practice regularly and try contributing to open-source projects to strengthen your skills.
Read MORE: https://yasirinsights.com/github-and-git-commands/
2 notes
·
View notes
Text
One monster remains before I've hunted every monster in Monster Hunter Freedom Unite's single player Village mode. I have put off fighting him because there was so much I wanted to try out or do, but this game can quickly move from 'fun diversion I can almost excuse as a mental health support in lieu of substance abuse' to 'waste of time being abused as a crutch'.
Before I tackle THAT monster, I need to revisit our old friend Tigrex. He's pretty easy with Gunlance. This reunion, however, features a fun twist:

two of them....

Last time I played this hunt, they never crossed paths. This time? Well. Hm! I'd reset the mission and hope for better start location RNG, but I think I need to just git gud.
2 notes
·
View notes
Text
this is, obviously, the kind of thing you ideally never use, and thus probably shouldn't really know?
however: I finally bothered to figure out how to use git rebase --onto to sync changes between multiple git branches that depend on one another.
normally, one runs git rebase [new base branch] to change the base of the the currently checked out branch to the target. typically this is git rebase main or git rebase master. there's a second argument that can go after the new base branch that defaults to the currently checked out branch; that argument makes following the documentation/examples I could find confusing and I always check out the branch I'm working on so I'm going to ignore it.
the --onto argument takes two inputs: the first is the same as the regular argument; the second is the last commit on the current checked out feature branch we want to drop because it is now obsolete.
I think the way git diagrams usually show branches is unhelpful here; here's mine. say I have this:
A---B---C---D feature1 A---B---C---D---E---F feature2
I realize that I have a bug in commit C in feature1, and the fix will merge conflict with D. I rewrite history on feature1 to fix it:
A---B---C*--D* feature1 A---B---C---D---E---F feature2
now I check out feature2, wanting to update it. I can't just do git rebase feature1, because git will try to make A---B---C*--D*--C---D---E---F. I can make a temporary branch based on feature1, cherry pick E and F onto it, then hard reset feature2 to the temporary branch, but that's silly. (I could probably do a number of other things; there are like eleven billion git commands. please comment if you know an even better way to do this.)
what I want to do here is git rebase --onto feature1 D (where D is the sha of commit D, the last commit I do not want to keep on feature2 because I am replacing it with the new base branch).
I have no idea why this command is not git rebase feature1 --onto D or something. replacing the first argument you would normally use with a flag and then the argument you would normally use and then another different argument makes precisely zero sense? but, whatever, fine. sure wasted me a lot of time in between the first time I read that manpage, gave up, did temporary branches for years, then finally figured it out, but you do you, git devs.
edit: oh, this probably goes without saying if you know enough git to read this, but this is only necessary if one does rewrite history on feature1. if you just commit a fix on it normally, git rebase feature1 (and then handling any merge conflicts in E and F) will work fine. that's why you generally don't need to know this; it's only necessary if you're manipulating your commit history because you think it'll provide useful clarity and think that's worth the complexity in your git workflow. I do it a fair amount because I tend to juggle multiple potential changes to the same code at once more than is probably wise, but I definitely lean toward not doing it, particularly in a codebase that uses squash merging for PRs and discards all of this history in the end anyway.
3 notes
·
View notes
Text
git HATES letting you remove files from repositories. oops that file is too big to push to github guess I'll not only add it to .gitignore but also reset my last 7 commits since I made it move it out of the folder and then recommit all my changes. please somebody tell me there's a better way to do this that I didn't find on stack overflow.
#before doing this yes I tried just removing it from the repository and I listed all the files in the repo and it wasn't there#but it was still there when I tried to push to github somehow
2 notes
·
View notes
Note
(typo in the group chat voice) does this mean the Bittercold was just trying a dramatic git reset --hard
munna was just trying really hard to push to master
but this is how we can stop them
open vim and dont tell them how to exit
7 notes
·
View notes
Text
A beginners guide to GIT: Part 3 - How to learn GIT after (or instead of ) this guide
Table of content: Part 1: What is GIT? Why should I care?
Part 2: Definitions of terms and concepts
Part 3: How to learn GIT after (or instead of ) this guide.
Part 4: How to use GIT as 1 person
Part 5: How to use GIT as a group.
First of all, GIT have a website:
And besides downloading GIT if you do not already have it, it has THE GIT book. It is honestly very good and contains quite a few translations
Second, GIT is one of the old pieces of tech. This means that it is open source, free, and that it contains its own documentation and guides.
If you are ever stuck, or confused about something in GIT, you can use the help command.
Simply writing
git help
Shows you the porcelain commands, and tells you that adding the option -a like so:
git help -a
gives you ALL commands
and the option -g gives you all the guides the manual have, like so
git help -g
If you give help another command,, it will bring you to the manual page for that command
for example, someone on the internet told you to write
git help reset --hard
and you want to know what that means before running it? Write
git help reset
And you will be shown the manual page for “reset”. Including what --hard does. (To understand the manual, you need to understand the concepts and terms from part 2.)
If you want more visual explanations, Atlassian's guides are public and also quite good (But , remember. Atlassian uses Bitbucket. Bitbucket is 99% GIT, but can still have tiny differences)
4 notes
·
View notes
Text
I love Ultrakills and Gravity Circuits but man they activate an internal "git gud" goblin in my brain that will reset a level over tiny mistakes when doing any run-through other than the first and it sucks.
3 notes
·
View notes
Text
You can learn Git easily, Here's all you need to get started:
1.Core:
• git init
• git clone
• git add
• git commit
• git status
• git diff
• git checkout
• git reset
• git log
• git show
• git tag
• git push
• git pull
2.Branching:
• git branch
• git checkout -b
• git merge
• git rebase
• git branch --set-upstream-to
• git branch --unset-upstream
• git cherry-pick
3.Merging:
• git merge
• git rebase
4.Stashing:
• git stash
• git stash pop
• git stash list
• git stash apply
• git stash drop
5.Remotes:
• git remote
• git remote
• add git
• remote remove
• git fetch
• git pull
• git push
• git clone --mirror
6.Configuration:
• git config
• git global config
• git reset config
7. Plumbing:
• git cat-file
• git checkout-index
• git commit-tree
• git diff-tree
• git for-each-ref
• git hash-object
• git Is-files
• git Is-remote
• git merge-tree
• git read-tree
• git rev-parse
• git show-branch
• git show-ref
• git symbolic-ref
• git tag --list
• git update-ref
8.Porcelain:
• git blame
• git bisect
• git checkout
• git commit
• git diff
• git fetch
• git grep
• git log
• git merge
• git push
• git rebase
• git reset
• git show
• git tag
9.Alias:
• git config --global alias.<alias> <command>
10.Hook:
• git config --local core.hooksPath <path>
11.Experimental: (May not be fully Supported)
• git annex
• git am
• git cherry-pick --upstream
• git describe
• git format-patch
• git fsck
• git gc
• git help
• git log --merges
• git log --oneline
• git log --pretty=
• git log --short-commit
• git log --stat
• git log --topo-order
• git merge-ours
• git merge-recursive
• git merge-subtree
• git mergetool
• git mktag
• git mv
• git patch-id
• git p4
• git prune
• git pull --rebase
• git push --mirror
• git push --tags
• git reflog
• git replace
• git reset --hard
• git reset --mixed
• git revert
• git rm
• git show-branch
• git show-ref
• git show-ref --heads
• git show-ref --tags
• git stash save
• git subtree
• git taq --delete
• git tag --force
• git tag --sign
• git tag -f
• git tag -I
• git tag --verify
• git unpack-file
• git update-index
• git verify-pack
• git worktree
3 notes
·
View notes
Text
After trying Magit for a bit, I ended up doing my own simple+minimal thing for Git in Emacs, built on a generic function I wrote. The only piece I'm using from Magit is the with-editor package.
I wrote a function which pops open a buffer to run a command. The buffer is named after the full command. I can supply context which is added to the buffer name after the command, or override the name entirely. The buffer is created if it doesn't already exist. By "pops open", I meant the same way that for example the help buffer is popped open, with `pop-to-buffer` - I call it `pop-to-command`.
(I actually have two variants of the function - one runs the command in a raw terminal emulator buffer, and one runs it in an Eshell buffer with terminal emulation. Both use the Eat terminal emulator package. I use the Eshell+Eat variant for this, because it keeps my keybinds+UX more consistent+ergonomic, has TRAMP integration, and lets the with-editor package do its magic.)
(Because I'm using Evil for the greater efficiency+ergonomics of vi-style modal keybindings/UX, I wrap the base function to add a modal nicety: When the command starts, the buffer is put into vi "insert" state (or the "Emacs" state in the case of no-Eshell-just-Eat variant), so that I can interact directly with the command. When the command terminates, the buffer is automatically put into vi "normal" state, so that I automatically return to the keybinds I use for switching/manipulating Emacs buffers, windows, etc.)
I then have a wrapper function to run Git commands with that pop-to-command function, using the current buffer's Git repository as the context.
So let's say I'm editing a file inside a Git repo I have cloned at `~/code/my-cool-project`, I save some changes, and I'm ready to stage them. I hit a keybind, and Emacs pops a buffer named `*eshell: git add -p (~/code/my-cool-project)*`. Since it's running `git add -p`, I am just using the normal Git CLI to review and stage hunks. Same knowledge and muscle memory that works outside of Emacs. Same diff view as outside of Emacs, which would be worse than Magit but lets me reuse better-than-Magit diff improvements like git-delta and difftastic. In the very rare event that I need the granularity of the "e" action in `git add -p`, that opens in my current Emacs instance thanks to with-editor. (Naturally I also have keybinds for the "-p" versions of git checkout, git reset, and git stash.)
When I'm ready to commit, I hit another keybind, and Emacs pops a buffer named `*eshell: git commit (~/code/my-cool-project)*`. Thanks to with-editor, that immediately opens the commit message for editing in Emacs itself, in the same window. When I'm done editing, my normal "save and close" keybind makes the commit - I can also quit without saving to abort the commit. (I monkey-patched with-editor using Emacs' "advice" so that if I save and then quit as two separate Emacs commands, the change is still left saved in Git's COMMIT_EDITMSG file even though the commit isn't made, as would normally happen with any other editor.) Naturally, I have a separate keybind for `git commit --amend`.
Magit automatically always shows the staged diff in a separate buffer while writing/amending a commit. I don't normally need that, but it's really nice to have when I do. I get this on-demand because I have two more keybinds: one for `*eshell: git diff (<current-repo>)*` and one for `*eshell: git diff --staged (<current-repo>)*`. Or sometimes I just leave the `*eshell: git add -p (...)*` buffer open until I'm done commiting.
Of course I also have keybinds for other git commands that I regularly want: git log [-p], git reflog, git pull, git push [--tags] [--force], and so on. Anything I use often enough to get annoyed by the handful of keystrokes it takes me to open Eshell and execute that command from a fuzzy-find on my shell history. (The only Git operation I don't handle this way is blame - I use the built-in vc-annotate for that, configured to wrap lines instead of truncating. The indirection of Eshell-running-Git-running-a-pager doesn't bother me with diffs and logs, but it bothers me in blame due to the different patterns in reading/navigation/search/copying. Also the color-coding by age is nice, and the step-back-through-blame-history feature is one I find valuable when I have to do code archeology to figure out the cause or intent of code which doesn't make sense.)
I have a nice keybind for `quit-window` in these run-one-command buffers which doesn't make sense in normal Eat and Eshell buffers. (Because I'm using Evil, this nice keybind is the mere "q" in vi "normal" state, which overlaps wonderfully with the "q" that you get in the default `less` pager when doing `git log` and so on. So for example I just hit "q" once to quit the log command and once more to quit the window - so I keep the benefits of totally decoupled composition where these pieces don't have to understand/track/assume anything about each other, while still getting something so ergonomic and intuitive that I never notice any delays, mistakes, or cognitive load.)
For me this approach covers basically all the value that I would get from Magit, without any of the rare-but-annoying latencies that I sometimes hit with Magit (or common-and-annoying latencies that I always hit with Magit when using Emacs in Termux on my Android phones). I sorta, theoretically, very very very rarely, miss the ability to just put my cursor on a diff hunk and stage/unstage it with a key stroke, or drill down into the diff for just one commit when already looking at a log. But I basically don't miss it - because it would only save me a few seconds and a handful of keystrokes. I don't miss Magit automatically reusing the diff buffer for staged and unstaged diffs, making it impossible to see both side-by-side. I really don't miss Magit asking me to save the file every time I asked for a Git diff. So I gain some value this way too.
I have some desire to eventully put the pop-to-command functions into their own package on the Non-GNU ELPA, and maybe do the same with my minimal Git wrappers if there's demand.
5 notes
·
View notes