#git reset
Explore tagged Tumblr posts
jack1236 · 18 days ago
Text
Git Reset
Git Reset - Learn how to safely use git reset to undo commits, unstage files, and discard changes.
1 note · View note
vivektech · 4 months ago
Text
Tumblr media
Use Git if: ✅ You need speed and distributed development ✅ You want better branching and merging ✅ You work offline frequently
1 note · View note
gabbymfoy · 7 months ago
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.
103 notes · View notes
cak3art · 3 days ago
Text
WIP Wednesday's
Post a wip from one or multiple fis in progress (your choice no pressure)
tagged by @speedyshark95
tagging @talictries anyone who wants? All my other fanfic mutuals have already been tagged :(
WIPS:
TIME LOOP
Lewis leaned against the wall and crossed his arms again. “Alright. What’s going on?”
George ran a hand through his hair. “You’re gonna think I’ve lost it.”
Lewis raised an eyebrow. “Try me.”
George stared at him. His breath came shallow.
“I’ve been stuck in a time loop.”
Lewis blinked. Just once. “Sorry- what?”
“Since Miami. Every day, it resets. No matter what I do. I wake up, and it’s always today. Same race. Same result. Over and over.”
Silence.
Lewis watched him carefully. “Mate… are you okay?”
George laughed - sharp, tired, bitter. “No, I’m not okay.”
Lewis took a step forward. “Is this burnout? Are you not sleeping? You need me to talk to someone for you?”
“I’m serious.”
Lewis went very still.
[…]
Lewis finally moved - stepped closer, placed a steadying hand on George’s shoulder. “Okay. Alright. I believe you.”
And that was it.
That was the thing that cracked him.
George’s breath hitched. His mouth opened, but no words came out. Just a raw, choked sound.
Lewis pulled him in without hesitation. Arms around his shoulders, firm and grounding.
George broke.
Not loud. Not all at once. But in the quiet, exhausted way people do when they’ve held it together too long. His hands curled into Lewis’s back. His whole body shook.
THE QUARRY F1 REWRITE
“Are you listening to a podcast again?” Alex asked, glancing over at Oscar in an effort to steer the attention away from himself.
Oscar shrugged. "Yeah. Some local folklore thing. ‘The Hag of Hamilton’s Quarry.’”
Carlos wrinkled his nose. “The what of what now?”
Oscar looked a little embarrassed. “It’s just an old legend about a woman who died near the quarry and supposedly haunts the area. Campfire stuff.”
Lando laughed. “You should’ve seen the kids when he told them. Absolute horror show. I thought one of them was gonna cry.”
“What’s the holdup?” Lewis called from the porch, arms crossed, clearly ready to be done with the season. “I’ve git places to be!”
Carlos waved one hand in the air in a dismissive circular motion. “Oscar was just busy telling ghost stories.”
“You asked!” Oscar shot back, defensive but not angry.
20 notes · View notes
blackstarz · 25 days ago
Text
Wolfstar microfic <333 you can find more here
January Prompt: First Fight
Fav quote: ‘I can’t believe you Reparo’d my face!’
Remus was sitting alone in the library when someone plopped down on the bench beside him. He knew who it was without looking up from his book on arithmancy.
“What are you doing in the library?” he asked quietly. Still, Pince shushed them from her desk. He’d long accepted that the old crone must have some sort of supernatural hearing.
“I need your help,” Sirius muttered.
Finally, Remus looked up, and barely hid his surprise as his eyes landed on Sirius’s face.
Dried blood was caked under Sirius’s nose, and it had an odd angle to it that was never there before. His eye was swollen, and Remus had no doubt it would be black come the next morning. A matching bruise sat on his jaw. “What happened?!”
“Shhh!”
Remus rolled his eyes, shoving his parchment back into his bag and hurrying further into the library, until he reached a reading table nestled between the tall shelves in the back of the library. Sirius followed him wordlessly, until Remus spun on him. “What happened?!” he asked again, his voice still hushed.
“What does it look like happened? I got into a fight!” Sirius whispered back harshly.
“With who?” Sirius rolled his eyes and crossed his arms over his chest.
“Are you going to help me or not?”
Remus squinted at him. It was a little dark, but he could still see the shape of Sirius’s nose. “Your nose is broken. You need to go see-”
“If I wanted to go to the infirmary, why would I be here? Don’t be thick, Lupin.”
Remus glared at him. “If you really want my help, insulting me is a piss poor way of showing it!”
Sirius’s mouth was pressed into a firm line. “Fine. Please, can you just fix my nose and my face, and I’ll be forever grateful.” He said, annoyed.
Remus huffed, but drew his wand anyway. “I need to reset your nose, but it will hurt. Madam Pomfrey could-”
“And then she’d also ask why I look like I’ve had my arse handed to me, and she’d figure it out pretty quickly that I came out better than the other party, when he no doubt drags his simpering arse down there.”
Remus stared at him, but held his wand to Sirius’s face. “Who was it? He asked, right before he flicked his wand. “Reparo!” There was a loud crunch, and Sirius yelped, swearing as he reached a hand up to his nose.
“Merlin’s saggy left nut! Fucking hell, Moony, give a man some warning next time!” he said, running his fingers down his nose. “Is it straight?”
Remus inspected it, creasing his eyebrows. “Yeah. Might be a slight bump though. Sorry.”
“Can’t believe you reparo’d my face! That’s not a healing spell!”
He shrugged. “I told you it would hurt. Who hit you?”
Sirius glared at him. “Regulus,” he spat. “Caught him hexing a second year – a muggleborn girl.”
“So you hit him?”
“No. I hit him after he started running his mouth,” Sirius snapped. Remus figured he probably wasn’t going to get much more than that, and stopped pushing. He might never know what exactly the little git had said to him, but he did know that apparently, Regulus Black could pack a mean punch.
“James had probably got something to heal bruises back in the room, from quidditch. You can use it to speed up healing the rest of your face.”
“Thanks.”
“Don’t mention it,” he said, grabbing his book bag that he’d dumped unceremoniously at the foot of the bookshelves. As they made their way back up to Gryffindor tower, they passed the infirmary, it’s doors sitting open.
As they walked by, Remus could see Regulus, sitting on the bed with his eye swollen shut. Next to him, the cutting, dark features of none other but Walburga Black stood, ranting angrily to Madam Pomfrey. Remus grabbed Sirius’s arm and dragged him by quickly, hurrying back to their room.
21 notes · View notes
carlyraejepsans · 4 months ago
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
telelli-writes · 10 months ago
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
jazumst · 1 month ago
Text
Jazu wśród starych bab
Żeby Was... O tym, że nie można żyć przyzwyczajeniami. Posłuchajcie:
Wstałem o 6:30 z tyłkiem ołowianym, gdyż o 4 mój organizm stwierdził, że to świetna godzina żeby nie spać. Robię śniadanie i zgarniam ochrzan od pani Matki, że krew to na czczo. O ile pamiętam to robiłem kiedyś o 13 i nie byłem na czczo, a nawet byłem po szlugu. Niepocieszony, niewyspany, głodny i zły oddałem się porannym modłom by uprosić łaski na dalszą część dnia.
//
W medycynie byłem po 7mej. Może z 10. Czekało już dwóch starszych jegomości. Zająłem swoje miejsce i kimam. Od 7:30 poczekalnie zaczęła się przepełniać. - Wszystko git gdyby nie ukr, który cały czas kaszlał i smarkał. W myślał zgadywałem ile jeszcze smarknięć do mojego przyjęcia. Zastanawiałem się też jaką dżumę przyniósł ze sobą. Kto, kurwa, przychodzi do medycyny pracy chory?!
//
W gabinecie cud miód, bez orzeszków. To ma pan dobre, to jest ok, to jeszcze może być. Robił pan ostatnio morfologię? Chce pan robić? OK. Badania ma pan do 2.06, zarejestruję pana do lekarza za tydzień. - Jak za tydzień?! Jutro! - Bardzo proszę. Gabinet 37, godzina 14. Do widzenia.
//
Z pobieraniem krwi... LOL W ogóle nikogo nie było w punkcie pobrań! Czaicie?! Żadnej starej baby! Przecież tego próchna jest wszędzie pełno! Nic, nikogo! Z pobraniem krwi całość zeszła mi 10minut XD Kończę śniadanie i robię reset kostki. Wczoraj odebrałem graty z paczkomatu.
youtube
A, miała być puenta ap ropo wstępu. U nas w medycynie zawsze schodziło pół dnia, jak nie dwa całe. Wszystko się wlokło jak karawana pogrzebowa. Jak długo pracuję, a jest to kawał życia, zawsze musiałem robić wzrok, płuca i krew. Stań na jednej nodze i wyczyniać cuda. CO ROKU! A teraz załatwione w 10min. Jak bym wiedział to nie wstawałbym tak rano :P
11 notes · View notes
ashhaven · 9 months ago
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
starheirxero · 1 year ago
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
25 notes · View notes
plasticfangtastic · 2 years ago
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...
Tumblr media
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.
Tumblr media
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
yasirinsights · 2 months ago
Text
GitHub and Git Commands: From Beginner to Advanced Level
Tumblr media
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
transienturl · 4 months ago
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
incirrata · 1 year ago
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.
2 notes · View notes
moose-mousse · 2 years ago
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
vixivulpixel · 2 years ago
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