Git Branches Tutorial
Branches are one of Git's most important concepts. And to master Git, it's essential to have a thorough understanding of how branches work. In this course, we'll look at the many actions you can perform around branches - from creating and deleting them all the way to publishing, renaming, and comparing them.
✏️ This course was created by Tobias Günther from Tower. Tower creates a powerful Git desktop GUI for Mac and Windows. You can download it here: www.git-tower.com
Note: This course focuses on using Git with the command line. You do NOT need Tower or any other GUI software to follow along.
⭐️ Course Contents ⭐️
⌨️ (00:00) Introduction
⌨️ (00:46) Hosted by Tower
⌨️ (01:27) Branches as a core concept in Git
⌨️ (01:51) Core concepts: the HEAD branch
⌨️ (02:25) Core concepts: local vs. remote branches
⌨️ (03:04) Creating new branches
⌨️ (05:21) Switching branches
⌨️ (07:26) Renaming branches
⌨️ (10:29) Publishing branches
⌨️ (12:10) Tracking branches
⌨️ (17:25) Pulling + pushing branches
⌨️ (20:22) Deleting branches
⌨️ (24:15) Merging branches
⌨️ (26:52) Rebasing branches
⌨️ (30:20) Comparing branches
⌨️ (32:30) Working with Branches Cheat Sheet: a handy resource for your daily work, free to download (www.bit.ly/git-branches-cheatsheet)
--
🎉 Thanks to our Champion and Sponsor supporters:
👾 Wong Voon jinq
👾 hexploitation
👾 Katia Moran
👾 BlckPhantom
👾 Nick Raker
👾 Otis Morgan
👾 DeezMaster
👾 Treehouse
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: freecodecamp.org/news
Пікірлер: 121
(30:20) Comparing branches Just a short note: if you use _three_ dots instead of two you'll see _all_ the differences in commits between branches, so not only commits that are in the second branch compared to the first but vice versa as well. Excellent intro to branches, very concise.
I live for you Intro Guy. FCC you are my ROCK!
Needed a git tutorial so bad! Thank you for all your effort and helping the comunity! Great job :)
This channel is a life saver.
@the_randhir_singh9098
3 жыл бұрын
Cool
Yours videos are really amazing and helpful. Huge respect
Yes! I was waiting for this! Thanks! I am slowly falling in love with GIT
It is really easy to understand with clear and straightforward examples. Thanks for your great effort! 😁
Extremely practical. Thank you for making this.
Great explanation! It refreshs my memory like a breeze!
Thank 🤓💜, the integration of the branches was clearer, I had confusion with the commands. Excellent 👾
Very comprehensive guide. An excellent teacher
Great Tutorial - just the level of abstraction I needed on the subject. Very pedagigical explanations...
I must say you guys are amazing..... thank you ❤
God bless u! I was having so much trouble figuring things out without your video! Thanks so so much!
Just awesome. Thank you so much!
I've learnt so much in this channel, I think I should tell my mother to bring you some goat milk :)) (we're nomads, it's costumery to give goats and goat products as gifts.)
@shauryakapoor2122
3 жыл бұрын
Nomads have phones/customer? Even access to internet. Could you please tell us more about your lifestyle, I'm curious.
@giorgioamato8176
3 жыл бұрын
He is a modern nomad
@bengilman5188
3 жыл бұрын
@@shauryakapoor2122 he’s gotta be trolling
@ossahmadrezaazimikohnabi5108
3 жыл бұрын
@@shauryakapoor2122 well I grew up in a city, so we do have net. But my parents where nomads for the first part of their life. Then my father went to school and became a health care worker, and was hired by the government, so technically we're not nomads any more, but my mother still does give people goat milk as a gift :))
@mosaed_b
2 жыл бұрын
Because you are a descendent of a nomad family, you are a nomad (in culture) and this might not mean technically you are nomad. That is also me, although I lived my whole life in a city, and I had ps1, ps2, ps3, ps4, pc, I am a software development employee, and my parents have degrees, but my grand grandparents were nomad, because of the high poverty at that time, so they have traveled a lot, and suffered, and we took their culture and manners.
This tutorial is very helpful!
Thank you, very good tutorial! 💛
Thankyou. It is such a helpfull tutorial to undestand git branches. Now also want to watch your git tutorial as well.
very useful, thank you!
Thanks! Very informative.
Thanks very short and straight forward tutorial
this s extremely awesome video about branching god bless you Mr with clear voice and explanation
Simple and concise.
Great tutorial.
Thank you!
Thank you for this good course
Very cool explanation!
Great tutorial 💛💛
Thank you for this very informative video and I will start using git switch to switch between branches too 👍!
ISTG, I was checking for it like yesterday!!!!!!
4:59 - Sorry if I lost something, but you can create as many branches you want on your remote repository, like Github, Bitbucket, Gitea, etc.
@MrTomro
2 жыл бұрын
yeah you are right.
Use this command "because I'm more comfortable with it". Thanks for the explanation.
Excellent tutorial
Great Video, explained nicely
Thank you!!! God bless!
thank you!
Amazing.. thank you so much
This man is Tech Curry
Great video
Can there be conflicts when merging branches and how do we deal with the conflicts if they may come up?
Tip: if you go to a terminal or shell and type git help, it will show you git commands and what their functions are.
Thanks.
'git push --delete origin feature/branch' is easier to remember, because the delete flag is of the push operation and then the location and object are given :)
@aljustiet
Жыл бұрын
I don't have it
Hi, I did some changes on a file locally (It's the only existing file...) but I didn't add it to the git project. Instead I created a new branch and made it active. Then I added the new modifications and commited them. I didn't push it yet to the remote repo. How can I access the unchanged (.pdf) file locally, say with adobe pdf-reader?
In the pdf file "working with branches in git" it says under publishing branches, that you can't create a branch remotely but instead you have to push the local one. So I did. But in github I couldn't see the new branch until I entered a name (the same one as locally) in a window called: "Find or create a branch". After that I could see the new branch also remotely. What is now correct?
Great tutorial! Although I would've chosen different names for branches as it makes it confusing to follow up. If the command is called "branch" then I wouldn't name my branch "my-branch" as there are too many occurrences of "branch". Or "uploader" as the name of a branch to be uploaded causes you to say things like "I'll upload my uploader", which can be confusing for beginners. Other than that, great sound quality, great flow and great content.
@pjmclenon
Жыл бұрын
the 1st command--git branch new-- doesnt even work
Please add Polish subtitles in the future, I am learning English along with programming and I admit that sometimes I do not understand what is being said. I really don't know a more valuable channel. Congratulations for your work!
Heck ya
Mass git tower mass
If i am in master branch and create a new branch the way it is described here, all the changes that i make on the new branch get automatically pushed to my master branch (and if i want to merge, git says my branch is already up to date). Can anybody explain?
amazing stuff... but now how do I push a whole folder to a specific branch?
Thanks for the video. Please can you do tutorials on digital marketing.
Oh git is so fun
never knew stephen curry so good at git
does anyone have the slides used for this session?
I love the way he teach. Does he have other tutorial videos on Git?
@27sosite73
Жыл бұрын
google him
you are great i like you youtube channel
Voting this one down for using tower
❤️🤟
at 15:04 is git branch --track an alternative to git clone?
For some reason I filled out the form 3 times over the last 3 months and can't seem to get the cheatsheet. Is there a way to just download it instead of having the download emailed?
How to update my git hub repository when i have downloaded a new npm package in my project.
Any chance to use tower in linux ?
A course on Three.js please
Hello, Im not able to download the cheat sheet.
👍
Continue from 17:24 Personal bookmark, please ignore
wow
Sir plz make a video tutorial on Objective-C plz plz
voila :p
Bless you guys. How can I contribute? Im not a super knowledgeable dev but I can be handy
what annoyed me is that, you were focusing on introducing the GUI thing. I gave it a thumbs up tho. good quality.
The intro guy so much looks like older gilfoyle
The course is great but never get to manage to get a cheatsheet. Too many clicks and always found myself in the loop. Never get the download link only email with Tower picture and confirm subscription. After confirmation it opens Tweet for the T-shirt and ....well the web is full of cheatsceats anyway so I stoped researching why is this happening. thanks tobias for explaining branches
His name's probably 47, Tobias reaper is just a stage name
Ya rabb
i did git init and the your command doesn ot even work
Maybe use Git locally so you stop training the Copilot
8:50
Cool😎 first comment
Merci !
Tobias rieper
also FIRST!
This video is a bit misleading. It only talks about the practical part of git branches. It didn't talk about what a git branch is and whether it's needed, when to use one, when not to use branches and the title didn't state whether it's for beginners or professionals. But I won't dislike it because it did at least explain how to create branches and work with them. You should change the video title to "How to work with git branches". I was looking for a more in-depth tutorial
hello why did you skip that we have to do git init 1st?
@pjmclenon
Жыл бұрын
sorry but from expernice its best to never skip or assume previous steps preamble etc but whaterver
QQQQQ
Only coders are first viewers
Thank you @freeCodeCamp for awesome tutorial.
Says you won't need tower for tutorial. Then immediately starts using tower.
@IfeSunmola
2 жыл бұрын
Right? I feel like half of the tutorial was in tower
would be nice if the presentator doesn't use a product you'd have to pay for after 30 days. how f-ing ridiculous can one be...
While I appreciate your dedication, however you have contradicted yourself. You said you will be doing everything from the cli but you constantly referred to your git UI instead of using the cli, NOT COOL
@HighRollersLounge
3 жыл бұрын
Because this whole video is actually an elaborate advertisement of tool called Git Tower
@liam_iam
3 жыл бұрын
ye it's an ad. but he's still performing all the actions from the cli and using the gui as a visual guide, which I think is useful
Presentation was nice, kudos for that, but the ugly marketing gimmick with the "cheat sheet" leaves you with a bad taste after all ...
Link to the cheatsheet mentioned at 32:40 www.git-tower.com/learn/cheat-sheets/git-branches/
C:\Users\Main\Desktop eact\test_repo2>git init Initialized empty Git repository in C:/Users/Main/Desktop/react/test_repo2/.git/ C:\Users\Main\Desktop eact\test_repo2>git branch branch1 fatal: not a valid object name: 'master' C:\Users\Main\Desktop eact\test_repo2>
Freecodecamp is the best source of learning code fr fr
Thank you!