Git Branches Tutorial

  Рет қаралды 236,794

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

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
@eelbo
@eelbo Жыл бұрын
(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.
@aethelbread
@aethelbread 2 жыл бұрын
I live for you Intro Guy. FCC you are my ROCK!
@salwabachraoui1730
@salwabachraoui1730 2 жыл бұрын
This channel is a life saver.
@the_randhir_singh9098
@the_randhir_singh9098 2 жыл бұрын
Cool
@carlosdm94
@carlosdm94 2 жыл бұрын
Needed a git tutorial so bad! Thank you for all your effort and helping the comunity! Great job :)
@sebiporini
@sebiporini 2 жыл бұрын
Yes! I was waiting for this! Thanks! I am slowly falling in love with GIT
@ritheshverma2332
@ritheshverma2332 2 жыл бұрын
Yours videos are really amazing and helpful. Huge respect
@user-ug2fw3wk3c
@user-ug2fw3wk3c Жыл бұрын
It is really easy to understand with clear and straightforward examples. Thanks for your great effort! 😁
@mattgraves3709
@mattgraves3709 2 жыл бұрын
Extremely practical. Thank you for making this.
@paulaabad8329
@paulaabad8329 2 жыл бұрын
Thank 🤓💜, the integration of the branches was clearer, I had confusion with the commands. Excellent 👾
@JLDRPT
@JLDRPT 2 жыл бұрын
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
@MrTomro 2 жыл бұрын
yeah you are right.
@dmitriilobanov3980
@dmitriilobanov3980 2 жыл бұрын
Very comprehensive guide. An excellent teacher
@rafapioli75
@rafapioli75 2 жыл бұрын
Great explanation! It refreshs my memory like a breeze!
@burkhartwolff4429
@burkhartwolff4429 2 жыл бұрын
Great Tutorial - just the level of abstraction I needed on the subject. Very pedagigical explanations...
@ossahmadrezaazimikohnabi5108
@ossahmadrezaazimikohnabi5108 2 жыл бұрын
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
@shauryakapoor2122 2 жыл бұрын
Nomads have phones/customer? Even access to internet. Could you please tell us more about your lifestyle, I'm curious.
@giorgioamato8176
@giorgioamato8176 2 жыл бұрын
He is a modern nomad
@bengilman5188
@bengilman5188 2 жыл бұрын
@@shauryakapoor2122 he’s gotta be trolling
@ossahmadrezaazimikohnabi5108
@ossahmadrezaazimikohnabi5108 2 жыл бұрын
@@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
@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.
@amyjackson1104
@amyjackson1104 2 жыл бұрын
God bless u! I was having so much trouble figuring things out without your video! Thanks so so much!
@RohitPatnaik7
@RohitPatnaik7 2 жыл бұрын
I must say you guys are amazing..... thank you ❤
@therealfreezzz
@therealfreezzz 2 жыл бұрын
Just awesome. Thank you so much!
@user-ii4td6qt8d
@user-ii4td6qt8d 3 ай бұрын
Use this command "because I'm more comfortable with it". Thanks for the explanation.
@WrestlingTournamentsDotCom
@WrestlingTournamentsDotCom 2 жыл бұрын
This tutorial is very helpful!
@ManojKumar-jb4sc
@ManojKumar-jb4sc 2 жыл бұрын
Thankyou. It is such a helpfull tutorial to undestand git branches. Now also want to watch your git tutorial as well.
@johplaysmusic
@johplaysmusic Жыл бұрын
This man is Tech Curry
@kostiantynkarzhanov9216
@kostiantynkarzhanov9216 Жыл бұрын
Thank you, very good tutorial! 💛
@matovumatthew1242
@matovumatthew1242 Жыл бұрын
Thanks very short and straight forward tutorial
@AlexBurov-wk8my
@AlexBurov-wk8my 8 ай бұрын
this s extremely awesome video about branching god bless you Mr with clear voice and explanation
@threekingdoms99
@threekingdoms99 2 жыл бұрын
very useful, thank you!
@Balkac
@Balkac 2 жыл бұрын
Very cool explanation!
@sherlockva
@sherlockva Жыл бұрын
Thanks! Very informative.
@pulok9909
@pulok9909 2 жыл бұрын
Great tutorial.
@chuck.dev007
@chuck.dev007 Жыл бұрын
Simple and concise.
@MovvaTapaswipeace
@MovvaTapaswipeace 2 жыл бұрын
ISTG, I was checking for it like yesterday!!!!!!
@uc7602
@uc7602 7 ай бұрын
Thank you for this very informative video and I will start using git switch to switch between branches too 👍!
@Phas0ruk
@Phas0ruk 2 жыл бұрын
Excellent tutorial
@7s9n
@7s9n 2 жыл бұрын
Great tutorial 💛💛
@soheilnazari6731
@soheilnazari6731 Жыл бұрын
Great Video, explained nicely
@hadouken99
@hadouken99 5 ай бұрын
Thank you for this good course
@thecrownofnoah9100
@thecrownofnoah9100 2 жыл бұрын
Tip: if you go to a terminal or shell and type git help, it will show you git commands and what their functions are.
@AmberRathour366
@AmberRathour366 Жыл бұрын
Thank you!
@viniciusm.m.7822
@viniciusm.m.7822 2 жыл бұрын
Thank you!!! God bless!
@darkexior
@darkexior 2 жыл бұрын
Amazing.. thank you so much
@AleksandarIvanov69
@AleksandarIvanov69 2 жыл бұрын
'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
@aljustiet Жыл бұрын
I don't have it
@webcodingoprogrammingtips2090
@webcodingoprogrammingtips2090 2 жыл бұрын
Great video
@teflonhav
@teflonhav Жыл бұрын
thank you!
@Sa-jh5xc
@Sa-jh5xc 2 жыл бұрын
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!
@anarelle
@anarelle 2 жыл бұрын
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
@pjmclenon Жыл бұрын
the 1st command--git branch new-- doesnt even work
@okidokiyowyow356
@okidokiyowyow356 2 жыл бұрын
Thanks.
@esiarbaantwi7271
@esiarbaantwi7271 2 жыл бұрын
Thanks for the video. Please can you do tutorials on digital marketing.
@adeni4359
@adeni4359 2 жыл бұрын
I love the way he teach. Does he have other tutorial videos on Git?
@27sosite73
@27sosite73 Жыл бұрын
google him
@louismarieatolukoayariga6052
@louismarieatolukoayariga6052 Жыл бұрын
Can there be conflicts when merging branches and how do we deal with the conflicts if they may come up?
@thevagabond85yt
@thevagabond85yt 8 ай бұрын
never knew stephen curry so good at git
@jettthecoder1185
@jettthecoder1185 2 жыл бұрын
Heck ya
@lakshmimanne8796
@lakshmimanne8796 2 жыл бұрын
Mass git tower mass
@sachinsudaraka6397
@sachinsudaraka6397 2 жыл бұрын
❤️🤟
@kayax01
@kayax01 2 жыл бұрын
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?
@kayax01
@kayax01 2 жыл бұрын
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?
@credoboyofficial
@credoboyofficial 2 жыл бұрын
Oh git is so fun
@StephenRayner
@StephenRayner 2 жыл бұрын
Voting this one down for using tower
@VskiDevs
@VskiDevs 2 жыл бұрын
amazing stuff... but now how do I push a whole folder to a specific branch?
@ketchupparty9997
@ketchupparty9997 2 жыл бұрын
A course on Three.js please
@jimshtepa5423
@jimshtepa5423 Жыл бұрын
at 15:04 is git branch --track an alternative to git clone?
@TheDareos93
@TheDareos93 Жыл бұрын
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?
@bluemodize7718
@bluemodize7718 2 жыл бұрын
you are great i like you youtube channel
@WorkHorse3002
@WorkHorse3002 8 ай бұрын
Continue from 17:24 Personal bookmark, please ignore
@karma_yogi_42
@karma_yogi_42 2 жыл бұрын
Bless you guys. How can I contribute? Im not a super knowledgeable dev but I can be handy
@dtisue85
@dtisue85 2 жыл бұрын
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?
@anissiddique9137
@anissiddique9137 2 жыл бұрын
Sir plz make a video tutorial on Objective-C plz plz
@its_kumar
@its_kumar 2 жыл бұрын
Any chance to use tower in linux ?
@md.iqbalmahamudmoon3012
@md.iqbalmahamudmoon3012 5 ай бұрын
does anyone have the slides used for this session?
@techtravelspirituality3573
@techtravelspirituality3573 2 жыл бұрын
👍
@VskiDevs
@VskiDevs 2 жыл бұрын
wow
@user-rf8qf9zi8i
@user-rf8qf9zi8i 5 ай бұрын
How to update my git hub repository when i have downloaded a new npm package in my project.
@markosmuche4193
@markosmuche4193 2 жыл бұрын
what annoyed me is that, you were focusing on introducing the GUI thing. I gave it a thumbs up tho. good quality.
@sivuyilesifuba
@sivuyilesifuba 7 ай бұрын
@super7ace
@super7ace Жыл бұрын
Hello, Im not able to download the cheat sheet.
@StellarStoic
@StellarStoic Жыл бұрын
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
@user-bk1le1nt5h
@user-bk1le1nt5h 11 ай бұрын
voila :p
@devangprabhune3591
@devangprabhune3591 2 жыл бұрын
The intro guy so much looks like older gilfoyle
@jyrj
@jyrj 2 жыл бұрын
Cool😎 first comment
@pjmclenon
@pjmclenon Жыл бұрын
i did git init and the your command doesn ot even work
@artificialcode
@artificialcode Жыл бұрын
His name's probably 47, Tobias reaper is just a stage name
@rabbanaabdilnakhairminqahr4648
@rabbanaabdilnakhairminqahr4648 Жыл бұрын
Ya rabb
@tarmon768
@tarmon768 2 жыл бұрын
Maybe use Git locally so you stop training the Copilot
@shivjyotigarai2141
@shivjyotigarai2141 Жыл бұрын
8:50
@jettthecoder1185
@jettthecoder1185 2 жыл бұрын
also FIRST!
@sanchalghosh2110
@sanchalghosh2110 2 жыл бұрын
Tobias rieper
@trotin
@trotin 2 жыл бұрын
Merci !
@AhsankhanAmu
@AhsankhanAmu 2 жыл бұрын
Thank you @freeCodeCamp for awesome tutorial.
@nalo6310
@nalo6310 2 жыл бұрын
QQQQQ
@yoshimitsupunk
@yoshimitsupunk 2 жыл бұрын
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
@louielee3583
@louielee3583 2 жыл бұрын
Link to the cheatsheet mentioned at 32:40 www.git-tower.com/learn/cheat-sheets/git-branches/
@pjmclenon
@pjmclenon Жыл бұрын
hello why did you skip that we have to do git init 1st?
@pjmclenon
@pjmclenon Жыл бұрын
sorry but from expernice its best to never skip or assume previous steps preamble etc but whaterver
@vpundir3024
@vpundir3024 2 жыл бұрын
Only coders are first viewers
@programming7685
@programming7685 2 жыл бұрын
Says you won't need tower for tutorial. Then immediately starts using tower.
@IfeSunmola
@IfeSunmola 2 жыл бұрын
Right? I feel like half of the tutorial was in tower
@Caldaron
@Caldaron 2 жыл бұрын
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...
@Nimitz_oceo
@Nimitz_oceo 2 жыл бұрын
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
@HighRollersLounge 2 жыл бұрын
Because this whole video is actually an elaborate advertisement of tool called Git Tower
@liam_iam
@liam_iam 2 жыл бұрын
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
@vajk7
@vajk7 2 жыл бұрын
Presentation was nice, kudos for that, but the ugly marketing gimmick with the "cheat sheet" leaves you with a bad taste after all ...
@pjmclenon
@pjmclenon Жыл бұрын
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>
@richiemugambi9487
@richiemugambi9487 2 жыл бұрын
Freecodecamp is the best source of learning code fr fr
@fabrice9848
@fabrice9848 5 ай бұрын
Thank you!
Git Branching and Merging - Detailed Tutorial
54:28
SuperSimpleDev
Рет қаралды 186 М.
How to Undo Mistakes With Git Using the Command Line
55:21
freeCodeCamp.org
Рет қаралды 82 М.
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 20 МЛН
PINK STEERING STEERING CAR
00:31
Levsob
Рет қаралды 23 МЛН
small vs big hoop #tiktok
00:12
Анастасия Тарасова
Рет қаралды 17 МЛН
ТАМАЕВ vs ВЕНГАЛБИ. Самая Быстрая BMW M5 vs CLS 63
1:15:39
Асхаб Тамаев
Рет қаралды 4,8 МЛН
How to be a git expert
46:26
Floating Little Leaves of Code
Рет қаралды 146 М.
Branching Strategies Explained
18:19
DevOps Toolkit
Рет қаралды 128 М.
Git MERGE vs REBASE: The Definitive Guide
9:39
The Modern Coder
Рет қаралды 85 М.
Git Tutorial For Dummies
19:25
Nick White
Рет қаралды 1 МЛН
Git MERGE vs REBASE
16:12
Academind
Рет қаралды 1 МЛН
Git Tutorial for Beginners: Learn Git in 1 Hour
1:09:13
Programming with Mosh
Рет қаралды 2,3 МЛН
Learn Git - Full Course for Beginners
3:43:34
freeCodeCamp.org
Рет қаралды 300 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
Sigma Girl Past #funny #sigma #viral
00:20
CRAZY GREAPA
Рет қаралды 20 МЛН