People like you deserve all the praise in the world. You are here to do one thing and one thing only and it is exactly what you did. No bullshit talking for 30 minutes, straight to the point and easy to follow. Much appreciated.
@erichepperlewp3 жыл бұрын
This was exactly what I needed. In the Git manual online it isn't very clear to me that my editor will pop up twice. You made this very clear and painless. Thank you!
@stephanie_ong3 жыл бұрын
Awesome video! This was a great refresher for me who has not used rename in a while.
@ahmeda51104 жыл бұрын
This really helped me so much. Thank you Eric. I never new the command :wq existed and was wondering how on earth I could continue in VIM with the rebase. Much appreciated.
@ismailkassim63254 жыл бұрын
At 2:13 when you wrote the commit, how did you get to the buttom? edit* Fix the issue. Press shift and colon( : ) at the same time -> shift + :
@ItsEverythingElse6 жыл бұрын
So you have to count back how many commits you need to go? That's really special.
@hyfytale95775 жыл бұрын
You can write 'git rebase -i ', where takes you from where you'd like to rebase from instead of counting commits.
@jaydraws20194 жыл бұрын
God level tutorial. You saved me hours of headache :)
@timothytimm7040 Жыл бұрын
this is awesome thanks for the video it helped me a lot👌
@prateekchourasia80314 жыл бұрын
Thanks man! Thanks a lot! I was shit scared because I was going to undo the commit for a month work xD
@SamScott_jr Жыл бұрын
Thank you
@andrewmriv5 жыл бұрын
Thank you for this! Worked like a charm
@TasniMarwane3 жыл бұрын
Thank you, sir, thank you very much.
@avimehenwal5 жыл бұрын
I am using rebase a lot lately ... thankyou *Y(
@diwakardayal954 Жыл бұрын
Wow 8 year ago xD how are u doing nice video btw
@sergelachapelle79924 жыл бұрын
Thank you! This helped me a lot...
@AyrtonPeralta3 жыл бұрын
really useful, thanks!
@fatememirjalili2 жыл бұрын
Thank you so much!
@cyorbea4 жыл бұрын
You rule man!!
@TarasAnichyn Жыл бұрын
Thanks)
@LignariusDM4 жыл бұрын
Hi, thanks for your video, however I keep running into the same issue which is driving me insane. Happens whether I use terminal in VS Code or the Terminal app. I enter git rebase -i HEAD~2 which opens the screen you see at 01:23. Then the weirdness happens. It won't let me replace pick with reword instantly. At first I'll start typing out reword but nothing happens, then after a couple of seconds it finally lets me do it. I'm assuming you're hitting the ENTER key to go to the next screen right? If I hit ENTER all it does is add a backspace. I basically cannot move past this screen, all I can do is Ctrl + C and then :qa! to get out of it. Any help would be much appreciated. Thanks in advance!
@phette234 жыл бұрын
It sounds like you're entering the vim editor which, unfortunately, does not have very intuitive controls. The reason why you start editing after some time is probably because you type the letter "i" eventually which puts you into "Insert" mode and lets you edit. A short summary is to type "i", make your changes, then use ESC to exit Insert mode, then type ":wq" when you want to Write your changes and Quit. You can see me do these steps in the video. I would recommend either learning how to use vim or changing your Terminal's EDITOR environment variable to nano (`export EDITOR=nano` in your bash profile) which is easier to use.
@LignariusDM4 жыл бұрын
@@phette23 Thanks for the reply, I'll give this a try!
@mazharabbas8715 жыл бұрын
Thanks, this is really helpful. +1
@sarveshchavan43917 жыл бұрын
no changes i can see it is as it is on website how long it takes to apply changes!!
@prashansagupta15964 жыл бұрын
After writing reword infront of the commits, I am unable to get to the last like where we write :wq. I tried clicking on the --INSERT-- line still it won't go. What to do?
@phette234 жыл бұрын
Type a colon ":" then the letters "wq" to Write and Quit. These are the controls for the vim text editor, so if you get lost you can look them up online.
@phette234 жыл бұрын
Oh it actually needs to be Escape (to exit Insert mode), then colon wq. So altogether it's- ESC : w q
@prashansagupta15964 жыл бұрын
@@phette23 thank you so much. This helped me a lot :)
@AG-im3dz3 жыл бұрын
Hi Eric, so the second editor appears automatically right after you :wq the first editor? Thanks,
@phette233 жыл бұрын
Yes! It does. The first editor lets you choose what you're doing and the second one will appear if you need to edit any previous commit messages, e.g. if you choose "reword" or if you "squash" together a few commits.
@AG-im3dz3 жыл бұрын
@@phette23 thanks !
@sulaimansayyed92485 жыл бұрын
Thanks
@nyjeltodd16547 жыл бұрын
hasn't changed for me
@hyfydistro3 жыл бұрын
What if it's like 50 commits long ago?
@jonathanharris23262 жыл бұрын
What would you do on the final screen if you were rewording multiple commits? Do you go to a new line and type the message?
@phette232 жыл бұрын
I believe your editor opens once for each commit message you are creating or rewording. So if you rebase and reword two commits, after saving the interactive rebase step, it'll show you two more editors and you have to write/quit from each. Git supports newlines in a commit messages so putting one in a message doesn't cause any special behavior. Only the first line is visible in some contexts, like `git log --oneline`, but the rest are always there and are visible in a simple `git log` with no extra flags.
@mansishah67297 жыл бұрын
Nice tutorial, thanks. But how can we push updated commit message to remote branch ?
@swatina5497 жыл бұрын
This process will automatically update changes on your remote branch. Make sure to press Esc button after modifying "pick" to reword and then type ":wq". This will bring you to the new interface window where you can modify your commit message.
@mansishah67297 жыл бұрын
Yes I did it. Thanks. As 'rebase' rewrites history on Git, after implementing it, I am facing challenge for one of my previous commit. Though I am not changing those files in newer commit, it shows as difference while I am merging two remote branches. Please let me know if you have any idea about it.
@kingslayer5403 Жыл бұрын
I used the ammend command but it did not reflect in the BitBucket.
@phette23 Жыл бұрын
Did you push your changes? All git commands only run against your local repo until a push/pull. If BitBucket already has the commit message you want to change, then you need to `git push --force` because you are overwriting data on the remote repo (this is generally dangerous, if you are working with others I would warn them that you are going to force push)
@millieandcupcake3 жыл бұрын
Hi how do i rewrite 3 commits when i posted them to github already? all 3 say first commit i want to change them. :)
@AverageGuy5132 жыл бұрын
How do this changed log msg gets pushed to the server ?
@phette232 жыл бұрын
Run `git push` like you would normally push changes to a remote repo. If the message you want to change is already on your remote repo, you need to `git push -f` but be careful overwriting commits if others are working on the repo too
@flueepwrien65872 жыл бұрын
why does it create a new commit when i try this :(
@phette232 жыл бұрын
Try what part? `git commit --amend` or `git rebase`?
@Blackjac Жыл бұрын
@@phette23 For some reason it does the same for me. whenver i try to rename a past commit it makes a new commit of the one im trying to reword.
@phette23 Жыл бұрын
@@Blackjac what are the exact steps you're taking? Like `git rebase HEAD~4` and choosing reword? That should reword the given commit message. It will create a _new_ commit to do so, though it doesn't necessarily look like it in the tree (the hash id will change though), but the old one shouldn't stick around. You may have some config setting on that changes the rebase behavior.
@Blackjac Жыл бұрын
@@phette23 ahhh i see, so I'd have to drop the old commits if i want to delete a commit that contains i.e (typos etc)
@phette23 Жыл бұрын
@@Blackjac every commit's ID / hash is based on the state of the repo at that time, including commit messages. So essentially all your commits from the revision up to HEAD are rewritten but the code changes remain the same if you're only rewriting a commit message