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 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.
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)
Nope! That's not how it works. Rebase is not going to create any additional commits. If you switch to branch B and run git rebase master, you will get: M1 -> M2 -> B1 -> B2 This will happen on branch B.
There's also people that go skydiving. It's very easy, just make sure the parachute works and you handle it correctly. If you forget to pull, the whole mess is on you. But just do it, it's super easy.
never re-base on the protected or private branches like develop ,main,master ...only do the re-base on story brnaches wr.to to the develop branch ..then merge it ..(it will be ffast forward and not merge commit will come and all the "comitts from perspn A " and commits from Person B are grouped together nicely !!
A very informative content with clear idealogy.
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.
hey bro need some help with git stashing, is there any way that i can contact u
@@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.
What is the difference between rebasing from master and feature branch?
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
Nope! That's not how it works. Rebase is not going to create any additional commits.
If you switch to branch B and run git rebase master, you will get:
M1 -> M2 -> B1 -> B2
This will happen on branch B.
Thank u for sharing such content. Really good content
thank you Hitesh, awesome description
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 ` .... :)
Add more comments guys don't only see content and go away.
Atleast this man deserves a like and share.😊
Cool, Very information and important.
Thank you so much ❤
Thumbnail is so nice
There's also people that go skydiving. It's very easy, just make sure the parachute works and you handle it correctly. If you forget to pull, the whole mess is on you. But just do it, it's super easy.
what terminal are you using?
Don’t forget to force push with a “git push -f” when doing a git rebase.
The main keypoint: NEVER DO REBASE ON MASTER/MAIN BRANCH... NEVER
This was really very informative!!
best git course out there
never re-base on the protected or private branches like develop ,main,master ...only do the re-base on story brnaches wr.to to the develop branch ..then merge it ..(it will be ffast forward and not merge commit will come and all the "comitts from perspn A " and commits from Person B are grouped together nicely !!
very infomative
#git #github
Ho gaya bhai
Can you provide notes ?
what about abort? it will end everything?
you really are a great teacher
Thank you so much sir❤
got the concept of rebase clear...
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😂
you can see the differene b/w didi bhiya course and hitseh sir's lectures
I'll watch this video again 1 or 2 times to get clear idea.
Now i understand it a bit better 😅
everyone please share this
Thank you sir ji
Thanks!!
Thank you Sir
thanks ❤
💯💯🎉🎉
Continue AWS after this
❤❤
❤
comment
Jesus is my Master 🙏💙🕎✝
Jesus is prophet ❤
Day 7 present
❤