Git rebase is not that scary

  Рет қаралды 21,532

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Git Rebase may seem daunting, but it's a powerful tool that, when understood, can significantly streamline your workflow. In this video, AES demystifies the Git Rebase process, explaining when and how to use it effectively. Many developers are cautious about using Git Rebase due to its ability to rewrite history, which can lead to unintended consequences if not used carefully. However, AES highlights that with proper understanding, this command can be a cleaner alternative to merging, eliminating unnecessary commits and maintaining a linear project history. The video walks through practical scenarios, demonstrating how to safely perform a rebase on feature branches, avoiding common pitfalls like rebasing on the master branch. By the end, you'll see that Git Rebase isn't as scary as it seems-it's a valuable tool in your version control toolkit, provided you know what you're doing. Whether you're managing a simple project or collaborating in a large team, mastering Git Rebase can help keep your project history tidy and easy to understand.
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.
All the learning resources such as code files, documentations, articles and community discussions are available on our website:
chaicode.com/
You can find our discord link, github link etc on the above website.
Twitter/X link: x.com/hiteshdo...
Discord link: hitesh.ai/discord
Learn React with 10 projects: • Let's learn react from...
Learn Docker: • A practical guide on D...
Learn Kubernetes: • Complete Kubernetes Co...
How does a browser works: • How does a browser wor...
How nodejs works: • How node JS works | En...
Learn Redux-toolkit: • Learn Redux Toolkit in...
Learn NextJS: • Nextjs Full stack course
Learn Typescript: • Why to learn Typescript
Learn Javascript: • Welcome to new JavaScr...
Learn React Native: • React Native Mastery: ...
Learn Zustand: • React state management...
Learn Golang: • How to get started wit...

Пікірлер: 41
@sahiljaiswal9270
@sahiljaiswal9270 3 ай бұрын
suppose M1, M2,... mean commits in master branch and B1, B2, ... means commits in a particular branch. if you go to that branch and run git rebase master it does this:(M3 added as new commit before B1, B2 in branch's log) B1->B2 B1->B2 ^ ^ M1->M2->M3 M1->M2->M3 and if you do the opposite, the main branch is shifted along the branch which is a problem. (B1,B2 added as new commits before M3 in master's log) B1->B2->M3...(master continues here) ^ M1->M2
@KakatkarAkshay
@KakatkarAkshay 5 ай бұрын
In case you mess up the rebase but you haven't removed .git folder, you can use git reflog to get commit history before rebase. Rebase is really not hard. I find it's the same as cherry-pick. Btw you should also show git rebase -i and squash, edit and things.
@tarun-d1t
@tarun-d1t 4 ай бұрын
hey bro need some help with git stashing, is there any way that i can contact u
@VictorYarema
@VictorYarema 3 ай бұрын
@@tarun-d1t my simplest advice after insane amount of my best years with git: never ever touch stashes even with the longest stick in the world. They are like branches, but are simply incredibly limited. Absolutely no business value compared to branches. Just master branches and that would be enough for everything you may ever need.
@ehsanhasin8092
@ehsanhasin8092 Ай бұрын
thank you Hitesh, awesome description
@ajaysubramaniam4453
@ajaysubramaniam4453 5 ай бұрын
What is the difference between rebasing from master and feature branch?
@jk-sm6qr
@jk-sm6qr 5 ай бұрын
Cool, Very information and important. Thank you so much ❤
@ankushladani496
@ankushladani496 5 ай бұрын
Add more comments guys don't only see content and go away. Atleast this man deserves a like and share.😊
@sumedhux
@sumedhux 5 ай бұрын
Thumbnail is so nice
@ofcljaved
@ofcljaved 5 ай бұрын
The main keypoint: NEVER DO REBASE ON MASTER/MAIN BRANCH... NEVER
@ratulsamanta9380
@ratulsamanta9380 5 ай бұрын
Thank u for sharing such content. Really good content
@streamstudiosllc
@streamstudiosllc Ай бұрын
Thanks!!
@harshitpant07
@harshitpant07 5 ай бұрын
what i learnt here is I don't care about the history so I don't care if their is a command called `git rebase feature ` .... :)
@i_vishalsah01
@i_vishalsah01 2 ай бұрын
got the concept of rebase clear...
@amaurya5556
@amaurya5556 5 ай бұрын
best git course out there
@charlesuneze4920
@charlesuneze4920 2 ай бұрын
Don’t forget to force push with a “git push -f” when doing a git rebase.
@uttamsharma3242
@uttamsharma3242 5 ай бұрын
This was really very informative!!
@zeroinfinity3610
@zeroinfinity3610 3 ай бұрын
you can see the differene b/w didi bhiya course and hitseh sir's lectures
@ShreyAsthana05
@ShreyAsthana05 3 ай бұрын
what terminal are you using?
@sivasai6890
@sivasai6890 5 ай бұрын
Thank you so much sir❤
@cyb3rjunky609
@cyb3rjunky609 5 ай бұрын
you really are a great teacher
@RohitChhabirajYadav
@RohitChhabirajYadav 5 ай бұрын
#git #github
@VivekKumarito
@VivekKumarito 5 ай бұрын
Ho gaya bhai
@RohitChhabirajYadav
@RohitChhabirajYadav 5 ай бұрын
Thank you sir ji
@2amCoder
@2amCoder 5 ай бұрын
what about abort? it will end everything?
@afamsval
@afamsval 5 ай бұрын
Thank you Sir
@imamansoni
@imamansoni 5 ай бұрын
I'll watch this video again 1 or 2 times to get clear idea.
@imamansoni
@imamansoni 5 ай бұрын
Now i understand it a bit better 😅
@shreyvasani8751
@shreyvasani8751 5 ай бұрын
Can you provide notes ?
@MunishMummadi
@MunishMummadi 5 ай бұрын
Just scratched my head with the rebase over a os contribution and this video is like how I approached it but it took hours for me😂
@munna5553
@munna5553 5 ай бұрын
everyone please share this
@ankitkashyap2005
@ankitkashyap2005 4 ай бұрын
❤❤
@ankushladani496
@ankushladani496 5 ай бұрын
💯💯🎉🎉
@ArbabMemon-r7m
@ArbabMemon-r7m 5 ай бұрын
@rishabh.jesani
@rishabh.jesani 5 ай бұрын
Continue AWS after this
@adityadarade6311
@adityadarade6311 5 ай бұрын
comment
@ws9691
@ws9691 Ай бұрын
Jesus is my Master 🙏💙🕎✝
@Moelkenzi
@Moelkenzi Ай бұрын
Jesus is prophet ❤
@coolwithsaquibaquib
@coolwithsaquibaquib 5 ай бұрын
Day 7 present
@not_amanullah
@not_amanullah 5 ай бұрын
thanks ❤
@Entire.Studio
@Entire.Studio 5 ай бұрын
Insight of pushing code to Github
40:58
Hitesh Choudhary
Рет қаралды 16 М.
Git Diff and stashing
28:23
Hitesh Choudhary
Рет қаралды 16 М.
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 95 МЛН
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 22 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 21 МЛН
The Joker wanted to stand at the front, but unexpectedly was beaten up by Officer Rabbit
00:12
Wordpress Open Source drama
15:46
Hitesh Choudhary
Рет қаралды 17 М.
The Most Important Skill You Never Learned
34:56
Web Dev Simplified
Рет қаралды 206 М.
How to make Pull Request and Open Source contribution
24:46
Hitesh Choudhary
Рет қаралды 13 М.
Git Merge VS Rebase In REAL TIME | DevOps Shack
12:22
DevOps Shack
Рет қаралды 15 М.
Git merge and git conflicts
39:37
Hitesh Choudhary
Рет қаралды 21 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,1 МЛН
Git commits and logs
16:36
Hitesh Choudhary
Рет қаралды 18 М.
Git PULL vs FETCH
7:13
The Modern Coder
Рет қаралды 21 М.
Running With Bigger And Bigger Lunchlys
00:18
MrBeast
Рет қаралды 95 МЛН