4:00 - Create feature branch from master: git branch new-branch-name 4:24 - To switch to a particular branch: git checkout branch-name 4:35 - Which branch am I on? git branch -a 6:30 - To delete a branch: Checkout any branch except the one you want to delete; git branch -D branch-name 7:25 - How to create new branch and check it out at the same time: git checkout -b new-branch-name
*Cheatsheet for this video:* $ git branch my-awesome-branch # create a new branch $ git checkout my-awesome-branch # switch to a specific branch $ git branch -a # view all branches $ git branch -D my-awesome-branch # delete a branch even if it's not fully merged $ git branch -d my-awesome-branch # delete a branch but only if it's is fully merged $ git checkout -b my-awesome-branch # create a new branch and switch to it immediately
googles git branch tutorial remember that net ninja may have a tutorial on this googles git branch tutorial net ninja already knows he's gonna be learned hard and learned easy
Amazing tutorial and teaching style. You teach in a tempo that allows to just do the things you do while listening to you in the background even not watching. Will highly recommend
Mate, I saw alot of tutorials about branches and yours is the best by far! Thanks to You, I finally understand what branches are about and I can use them as well.
Wish I had watched this before. Git is indeed needed, I had a project wherein I would save all the code into another folder and then make changes in case the code dumped. But git makes it a lot more easier to revert your changes in a second
At least on Mac, "git branch" without explicitly including the "-a" flag will still show you all the branches in your repository, as well as the branch that you're on currently on using the color and asterisk approach, as per this video :)
When I checkout from a new branch to master, the files associated with the new branch are not automatically removing from the atom project folder at the left top side. Why??
Would it be appropriate to use branches to deploy slightly modified versions of the master branch to different servers? or is there a better strategy. For example you set up separate servers to host your app for 2 different clients, but one of the clients requires some customization to be made
Hi Net Ninja. I love your tutorials, thank you for everything. I have a question. You first committed the changes in the js file to branch feature-b. You then checked out the master branch. While looking at the master branch, although the old js file itself was not visible, the code from the old js file remained in the tab in the editor. When you go to close it, it gives you a warning asking if you want to save it. Is this a feature of Atom or a bug? If it is a feature, how do you turn it off?
@@likkiii07 Asked that question when I started learning Django. It's beautiful for me to see how far I've come. Weird how I've not needed to revert a revert since I started using git seriously 😅 Thank you!
i can't create branch from what you do in this video.. git branch (branch_name) - after entering this code this message returns "fatal: Not a valid object name: 'master'."
Sorry but this behaviour is not consist on Windows. When you switch back to master the file from the new branch is that there as an uncommitted change. and you can not move back to the new branch you just created because it is locked out. Until you commit the file that was just created.
4:00 - Create feature branch from master: git branch new-branch-name
4:24 - To switch to a particular branch: git checkout branch-name
4:35 - Which branch am I on? git branch -a
6:30 - To delete a branch: Checkout any branch except the one you want to delete; git branch -D branch-name
7:25 - How to create new branch and check it out at the same time: git checkout -b new-branch-name
4 years later and this is still one of the best git tutorial on youtube
This was incredibly clear and concise. Thank you for these.
Thanks so much, really glad you liked :)
*Cheatsheet for this video:*
$ git branch my-awesome-branch # create a new branch
$ git checkout my-awesome-branch # switch to a specific branch
$ git branch -a # view all branches
$ git branch -D my-awesome-branch # delete a branch even if it's not fully merged
$ git branch -d my-awesome-branch # delete a branch but only if it's is fully merged
$ git checkout -b my-awesome-branch # create a new branch and switch to it immediately
Im new to Git and GitHub, so thanks for the clear and understandable explanation.
*googles git branch tutorial*
*realizes it's net ninja*
*already knows he's gonna be learned hard and learned easy*
Thank you for what you do, Shaun!
googles git branch tutorial
remember that net ninja may have a tutorial on this
googles git branch tutorial net ninja
already knows he's gonna be learned hard and learned easy
Amazing tutorial and teaching style. You teach in a tempo that allows to just do the things you do while listening to you in the background even not watching.
Will highly recommend
You're an excellent communicator! Happy I found your channel. Been subscribed since I started my coding journey.
Awesome! Thank you! :)
Man your explanations are crystal clear and beginner friendly, greetings from Bangladesh.
Incredibly straightforward and well-explained.
Thanks!
Thank you so much! This really helped me visualize what was actually happening when a new branch was created.
The brevity and clarity on this video is so appreciated! Thank you! You're a legend.
Mate, I saw alot of tutorials about branches and yours is the best by far! Thanks to You, I finally understand what branches are about and I can use them as well.
This guy is a god at teaching. Why don't they hire teachers like you in our colleges TT
Man you make everything so simple bro. Really appreciate you making this. Best online by far.
This was SO GOOD! Simple, concise & gives you the exact, practical info you're looking for! Perfection
The Net Ninja is really an amazing guy!
This is an excellent video on branching. Thanks for putting this together so well.
Just a Git Ninja 😁 Awesome job, man!
Wish I had watched this before. Git is indeed needed, I had a project wherein I would save all the code into another folder and then make changes in case the code dumped. But git makes it a lot more easier to revert your changes in a second
Really good tutorial! I like that you kept open editor on the left
Why would anyone dislike the video. The `branch` video on YT.
Crystal clear explanation sir
good job sir because i survive 2nd yr college!
me too
writing git commit messages in present tense is a good habit
At least on Mac, "git branch" without explicitly including the "-a" flag will still show you all the branches in your repository, as well as the branch that you're on currently on using the color and asterisk approach, as per this video :)
You are so great. Hope you make a series on Git Flow as well.
incredible tutorial, especially your examples make understanding easy
Thank you so much, git was really annoying me and your lesson is perfect
excelent video mate, straight to the point 👍👍👍
Awesome :) thank you for watching and taking time out to comment!
very well explained, the net ninja makes thinks look so easy. thank you so much
the best git tutorial on youtube thanks
Maaaan ya are great! Perfect work! Your lessons are so simple, thx.
tutorial level : GOD
Great tutorial, so clear and easy to follow, you should get paid for this, watching all of your stuff now. Thank you
You are really good at this, keep up the good work, man.
Thanks, ninja, very good course :)
To test out creating a branch, I actually did the opposite of you haha! I deleted a file in the branch, but left it in the master ;p
Great tutorial Net Ninja...
Thanks for putting it more clearly :)
Every time your Windows sounds with a dialog, I think it's mine, and I have a Mac, and in Work I use Linux! 🤪
SO HELPFUL! Thank you.
Glad it was helpful! :) thanks
Very clear, many thanks
Love you Ninjaa!!
Great tutorial! Really appreciate it!
Thanks for making it so simple
Thank you for the help!
No problem Mauricio, thanks for watching!
Thanks so much
that's what I was looking for
Waow Very Helpful.
Thank you
thanks
When I checkout from a new branch to master, the files associated with the new branch are not automatically removing from the atom project folder at the left top side. Why??
Here before github renames it's "master" branch
Hi Shaun,
Thanks for the excellent tutorials. Can you make a tutorial on Native Script also?
Thanks
Would it be appropriate to use branches to deploy slightly modified versions of the master branch to different servers? or is there a better strategy.
For example you set up separate servers to host your app for 2 different clients, but one of the clients requires some customization to be made
thanks very useful
Great tutorial for git................... whether it will work for all extension files????
N - word: nobutwhatareyoutryingtoask?
Thank you!
Tremendous!
Thanks man!!!
Hi Net Ninja. I love your tutorials, thank you for everything. I have a question. You first committed the changes in the js file to branch feature-b. You then checked out the master branch. While looking at the master branch, although the old js file itself was not visible, the code from the old js file remained in the tab in the editor. When you go to close it, it gives you a warning asking if you want to save it. Is this a feature of Atom or a bug? If it is a feature, how do you turn it off?
I like brunch!
git branch is enough the -a isnt needed when using VSCode. Anyone know if there is any reason for using -a?
"It's just a javascript feature." lol
How do you undo a revert commit?, and a reset commit without the --hard flag.Thanks
try reverting that revert commit again lol
@@likkiii07 Asked that question when I started learning Django. It's beautiful for me to see how far I've come. Weird how I've not needed to revert a revert since I started using git seriously
😅
Thank you!
Merci :)
Good but that windows sound made me nuts of why my pc is doing noise till I find it was yours.lol
Fortnite Ninja POG
i can't create branch from what you do in this video..
git branch (branch_name) - after entering this code this message returns "fatal: Not a valid object name: 'master'."
thanks very much :)
You're welcome :)
So, *git checkout -b feature-a* replaces
*git branch feature-a*
*git checkout feature-a*
in a single command?
Yes.
keep it up
cool!
Sorry but this behaviour is not consist on Windows. When you switch back to master the file from the new branch is that there as an uncommitted change.
and you can not move back to the new branch you just created because it is locked out. Until you commit the file that was just created.
what is this theme
whooo
anyone in 2024?
Miller Jeffrey Smith Lisa Hall James
whooo