I HAVE MORE GIT VIDEOS! ruclips.net/p/PLfU9XN7w4tFwKwh_xPSQ_X1-hROQEpHnM. Additionally, a written reference for this video is available on my blog: www.themoderncoder.com/git/
put the timestamps before the topic in the description and RUclips will automatically add chapters to the progress bar 0:00 - intro 0:40 - Amending commits 2:04 - Rewording commits 4:14 - Deleting commits 5:34 - Reordering commits 7:04 - Squashing commits 9:09 - Splitting commits The "0:00" is needed
Thanks for this! If you stick to Vim as the default Git text editor, you may want to know about the following commands as a starting point: gg → Go to top of buffer/file. ddp → Delete a line and put it below the current one (to re-order commit). `dd` deletes a line while `p` put it below the current line. ddkP → Delete a line and put it above the current one. `dd` deletes a line, `k` moves up one line and `P` (uppercase) pastes above the current line. h / j / k / l → Move around à la Vim. x → Delete a character xp → Switch the order of two characters. G → Go to the end of the buffer/file. ZZ → Save and quit buffer. For this purpose, same as `:wq` but less keystrokes ;). There's obviously much more to learn, but that should be useful to at least do some basic operations. Also, when splitting a commit, a single file might be part of two commits. So to commit only part of a file, there's also an interactive staging mode: git-scm.com/book/en/v2/Git-Tools-Interactive-Staging
@@SomeRUclipsGuy I thought a similar thing, but would recommend 'cw' (change word) instead, which enters you into insert mode after deleting the word. So it is equivalent to 'dw' + 'i'
Your style of teaching is one I've always wished for - the instructions but alongside an actual visualisation of what is happening in the end goal. I've been struggling to understand my teacher but thank you for this video and others.
This channel is COMPLETELY underrated. You deserve a tonne more subscribers. Keep consistently making quality videos such as this, and you will make it bigger in no time!
I have searched for answers and videos I didn't get anywhere, but the way you explain git is amazing and one of the best explanations ever seen. You are soo good at Git man. Thanks for the Video. Please make more videos. I love it
I mean, so many comments before have said this, but I need to confirm: this tutorial was more clear and understandable than the articles and other videos I watched about rebasing and changing Git commit history! I get it now!
1) in vim instead of :wq you can use :x its shorter 2) when explaining drop, you should mention, that changes in README file also will be reverted, not only commit message from git history, so people who wants only remove commit message, but not changes should use fixup 3) in vim, instead of cut-paste, use copy (press yy on line to copy in command mode) + paste (press p on line above place where you want paste) + delete (press: dd on line to delete)
I came to Git from SVN -- and the ability to modify history was probably the hardest thing to wrap my head around. Not only that it was possible, but that there were situations where it is actually desirable! Now ... well, I could not go back to SVN! 🙂
Great explanation and the graphical representation you used while typing the commands made it much easier to understand from a visual perspective. Keep up the good work!
Excellent! Thank you so much for this video. I have struggled with rebasing and was scared. But your teaching skill is excellent and I learnt in few minutes and used it successfully.
Can we all take some time and address that this is the best Git tutorial video... On the internet.... And how many dumb asses this guy has saved including mine.. .... 😊. # Awesome explanation guru ..!!
4:07 git recreates every commit from HEAD~2 onward, not just the one that gets reworded. The first commit's hash changed from 8fe3 to bb99 indicating that it's a different commit. Same goes for deleting, reordering etc
Thank you! I like when you show the graphic, because it explains exactly what is git doing under the hood. It would be greate if you could explain how does command "pick" work combined for instance with a remote master? What is the efficient way to pick a commit between many commits, add changes and push it to origin master. How can we manipulate the history of commits, which were already pushed to origin master? Thank you for your response.
Any sort of rewriting of commits that have already been pushed to remote master is not recommended. That's why you saw me in the video working mostly with commits on a local feature branch, because it's dangerous to rewrite history that is shared upstream to other collaborators. If you absolutely need to rewrite commits that have been pushed to remote branches, you can use "git push --force" but you'd need to have every other collaborator do a hard reset of their local repos. If you do this just note that every action that I went over in the video is destructive (even rewriting the commit message wipes away and rebuilds the original commit) so rewrite remote history at your own risk
I think we can also go directly to the commit by git checkout . This will give us a detached HEAD. Then you do all you need - unstage, add, and recommit etc. Then attach the HEAD to a temporary branch and merge/rebase it with some exisiting branch. But I guess the interactive rebase is much easier? By the way video is great. Thanks.
Thanks, you really know how to explain in a faster and cooler way. Just one question, how can I perform these operations if I have previously pushed my changes?
@@themoderncoder Soft Skills. They are as much crucial as Hard Skills. The idea is to present the most important of them, and how can Soft Skills turn you into a rare professional.
Stuff like this makes me wonder, at what stage of learning am left off with GIT, nevertheless it was a great video, but very helpful for all as there are a lot of situations at work one has to deal and knowing that one in your team is present to count on when it comes to those situations!!! Thanks @The Modern Coder, Subscribed n Liked :)
I HAVE MORE GIT VIDEOS! ruclips.net/p/PLfU9XN7w4tFwKwh_xPSQ_X1-hROQEpHnM. Additionally, a written reference for this video is available on my blog: www.themoderncoder.com/git/
Pure gold! Learnt faster in those 12 mins than reading any book.
3 hours of other videos in 13 minutes. Awesome. Thanks a lot
put the timestamps before the topic in the description and RUclips will automatically add chapters to the progress bar
0:00 - intro
0:40 - Amending commits
2:04 - Rewording commits
4:14 - Deleting commits
5:34 - Reordering commits
7:04 - Squashing commits
9:09 - Splitting commits
The "0:00" is needed
thx
Good tip thanks. I went ahead and made those changes
Thanks for this! If you stick to Vim as the default Git text editor, you may want to know about the following commands as a starting point:
gg → Go to top of buffer/file.
ddp → Delete a line and put it below the current one (to re-order commit). `dd` deletes a line while `p` put it below the current line.
ddkP → Delete a line and put it above the current one. `dd` deletes a line, `k` moves up one line and `P` (uppercase) pastes above the current line.
h / j / k / l → Move around à la Vim.
x → Delete a character
xp → Switch the order of two characters.
G → Go to the end of the buffer/file.
ZZ → Save and quit buffer. For this purpose, same as `:wq` but less keystrokes ;).
There's obviously much more to learn, but that should be useful to at least do some basic operations.
Also, when splitting a commit, a single file might be part of two commits. So to commit only part of a file, there's also an interactive staging mode: git-scm.com/book/en/v2/Git-Tools-Interactive-Staging
Great comment but I'm surprised you didn't include 'dw'. No one should be backspacing a word in Vim
@@SomeRUclipsGuy I thought a similar thing, but would recommend 'cw' (change word) instead, which enters you into insert mode after deleting the word. So it is equivalent to 'dw' + 'i'
@@joshuakoehler6457 It would seem you know a tiny bit more Vim than I.
Been 2 days trying to learn how to delete a commit and you just came and and did it in 2 minutes
Perfect video, short, precise with visualization. Not like telling the history of git for 40 minutes, and then start explaining things like others do
Your style of teaching is one I've always wished for - the instructions but alongside an actual visualisation of what is happening in the end goal. I've been struggling to understand my teacher but thank you for this video and others.
I like that this video is recorded in a kitchen. Makes it feel less intimidating. Also very clear explanations.
This was gold, helped me a lot. Definitely great teaching abilities.
I wish you wouldn't have stopped uploading git tutorials, they are by far the best I've seen and I've seen many
Was stuck on a PR as I was unable to edit a commit's changes this video saved me. Really helpful
This channel is COMPLETELY underrated. You deserve a tonne more subscribers. Keep consistently making quality videos such as this, and you will make it bigger in no time!
I have searched for answers and videos I didn't get anywhere, but the way you explain git is amazing and one of the best explanations ever seen. You are soo good at Git man. Thanks for the Video. Please make more videos. I love it
The animation is what is required to understand Git commands...thanks for making the effort to make them to explain....please make more videos on Git
Best, clearest git tutorials by a country mile. Thanks.
i fixed something today by manual merging with dev branch if i knew this before i wouldnt need to do manual work. Thanks man nice videos
Over and over hank you again to express yourself in so clear way
This is the best explanation I have seen for Git's commands, and they are real world solutions for real world problems. Thank you very much.
You have a gift for teaching. Very concise and easy to understand.
I mean, so many comments before have said this, but I need to confirm: this tutorial was more clear and understandable than the articles and other videos I watched about rebasing and changing Git commit history! I get it now!
Subscribed!
You might be the only RUclipsr I have an occasional compulsion to listen to at lower than normal speed :D
Holy shit, git rebase is powerful.
I will keep this in mind whenever I want to fix something in my git history.
best series on non-basic git, congrats
git rebase is a very powerful tool. Thanks for sharing your knowledge :)
This is the best video by far I have seen on RUclips. Thank you so much man....
Really like the video, and the written blog is good too. Clear, concise and to the point.
Your Git Videos are really helping me to play with my commits & branch at work. Thank you so much.
Can't express how thankful I am to you. So accurate and informative. Thank you indeed
1) in vim instead of :wq you can use :x its shorter
2) when explaining drop, you should mention, that changes in README file also will be reverted, not only commit message from git history, so people who wants only remove commit message, but not changes should use fixup
3) in vim, instead of cut-paste, use copy (press yy on line to copy in command mode) + paste (press p on line above place where you want paste) + delete (press: dd on line to delete)
3) dd and P was all he need. No yank was needed in this video.
To clarify in 3) dd is like cut, yy is like copy, p is like paste (but using registers instead of clipboard)
I came to Git from SVN -- and the ability to modify history was probably the hardest thing to wrap my head around. Not only that it was possible, but that there were situations where it is actually desirable! Now ... well, I could not go back to SVN! 🙂
Great explanation and the graphical representation you used while typing the commands made it much easier to understand from a visual perspective. Keep up the good work!
Dude it really helped me a lot i was missing the few of these concepts of git thank you.
This is the best tutorial of git I have ever seen.
Thanks man
Excellent! Thank you so much for this video. I have struggled with rebasing and was scared. But your teaching skill is excellent and I learnt in few minutes and used it successfully.
Simply the best GIT explanation ever, super concise and really helped me get out of a pickle today !!! THANK YOU !
Thank you very much. This was just what I needed to clean up my merge requests
Concise and straight to the point.
Bravo!
Hidden gems of youtube.
Another excellent video, wish you'd come back to RUclips and do more!
It is crazy this is free content!
Great concise explanation of everything that might matter to someone!
Can we all take some time and address that this is the best Git tutorial video... On the internet.... And how many dumb asses this guy has saved including mine.. .... 😊. # Awesome explanation guru ..!!
Nice dude
All things I've done before, but I do them so infrequently I forget the work flow... thank you so much for the walk through!
Voila...you gained a subscriber.. just loved the way you explain technically and practically
Best explanatory video on all this subjects! Thanks and keep up the good work!
Very well explained! Super good with the visual branches to better understand what's happening
God bless you. Please do you have content on Jenkins or Terraform or Ansible? You teaching style is unmatched.
Can't say I've used Jenkins, Terraform or Ansible yet, but I do plan to make more git videos
Good job this video looks edited by a professional company, the animations really help, keep up the good work
4:07 git recreates every commit from HEAD~2 onward, not just the one that gets reworded. The first commit's hash changed from 8fe3 to bb99 indicating that it's a different commit. Same goes for deleting, reordering etc
Absolutely right
Omg did not know that is possible to reording commits. So darn simple! Thank you!
Short and precise. Good job sir
You r underrated bro...keep making videos
This was an amazing video. I learned a lot, including: I will never split a commit.
Awesome buddy! I'm trying to go deep into git.. and this video was gold.
You make a really good teacher...
This man sitting in his kitchen saving life of thousand of engineers. Kudos
Love it. Those were the days
The best channel for learning git = )
Clear and crisp. Thank you.
Thank you! I like when you show the graphic, because it explains exactly what is git doing under the hood. It would be greate if you could explain how does command "pick" work combined for instance with a remote master? What is the efficient way to pick a commit between many commits, add changes and push it to origin master. How can we manipulate the history of commits, which were already pushed to origin master? Thank you for your response.
Any sort of rewriting of commits that have already been pushed to remote master is not recommended. That's why you saw me in the video working mostly with commits on a local feature branch, because it's dangerous to rewrite history that is shared upstream to other collaborators. If you absolutely need to rewrite commits that have been pushed to remote branches, you can use "git push --force" but you'd need to have every other collaborator do a hard reset of their local repos. If you do this just note that every action that I went over in the video is destructive (even rewriting the commit message wipes away and rebuilds the original commit) so rewrite remote history at your own risk
@@themoderncoder hi buddy how are you?
I can not see any new content on this channel since 2 years. I hope you are well.
Very clear and concise explanations - thanks.
Awesome video! Great example of explaining stuff to the point with really good examples.
I think we can also go directly to the commit by git checkout . This will give us a detached HEAD. Then you do all you need - unstage, add, and recommit etc. Then attach the HEAD to a temporary branch and merge/rebase it with some exisiting branch. But I guess the interactive rebase is much easier? By the way video is great. Thanks.
Hey, thanks a lot for this tutorial! I've looked through several text ones, but they were not as clear as yours!
Please make a video about 'git reset'. Awesome video btw. 😊
Very informative with awesome explanation.
excelent vídeo. very clear explained. that kind of graphics are a very good idea.
Thank you very much for your content. Extremely helpful. Love the animations, they make it so easy to wrap your head around the concepts.
Thanks man..it really cleared the doubts✌️
Thank you for this superb video. Awesome animation and edit makes this video more awesome.
You are a genius!! This video has helped me a lot
very helpful and short video. short time you teach me alot.
thank you !
Nice one bro. Try doing more backend stuff, seems you're really good at breaking up complex stuff.
Any suggestions?
@@themoderncoder php, python or javascript. Thank you.😎
Thanks for making this video. This has solved most of my problems.
Thanks, you really know how to explain in a faster and cooler way. Just one question, how can I perform these operations if I have previously pushed my changes?
Great job! Explains everything so easily :)
Very good video. Well explained. Thank you!
Great video !! Couldn't have explained it any better !!
Thanks a lot, this tutorial helped me a lot to fixing my shitty commits,
4:00 hash of the last commit has changed as well as one with fixed message
(4:05 you said everything else stayed the same so...)
Great video btw! :)
Thank you so much. Very good tutorial. and good animation too
Wow. You made it so easy to learn. Thank you 🙏
This is just a great tutorial!
Great tutorial! Very useful and nicely explained.
Great video, so clean explanation.
Thank you very much for your knowledge sharing, you're the best!
Wonderful !! Thanks for this video man.
Great video,solved so many doubts
I'm thankful for your content
Love your videos! I hope you go ahead with them!
For sure. Got any idea for topics?
@@themoderncoder Soft Skills. They are as much crucial as Hard Skills. The idea is to present the most important of them, and how can Soft Skills turn you into a rare professional.
Thank you so much for this compilation
These videos are fantastic!
Great job! great explanation!
you are awesome !!. Great Thanks for this concise 10 minutes tutorial on "git rebase interactive".
the best of the best.
Mathew. K from Colorado
Thank you very much for your content. Extremely helpful
Stuff like this makes me wonder, at what stage of learning am left off with GIT, nevertheless it was a great video, but very helpful for all as there are a lot of situations at work one has to deal and knowing that one in your team is present to count on when it comes to those situations!!! Thanks @The Modern Coder, Subscribed n Liked :)
very useful and every minute of the video is IMP
Absolute life saver! Thanks a ton for this.
Thank you so much.... rebase looks like a powerful tool
I love your videos. Can you make one for Revert and reset.