How To Use Git to Collaborate with Others [Git Tutorial]

  Рет қаралды 9,309

HenrikM Dev

HenrikM Dev

Күн бұрын

Want a programming project to help you practice using git?
From no coding experience to building your first app
📘Download my FREE programming guide here:
henrikmdev.com/firstapp
How do developers collaborate on projects using Git?
They use something called Git branches. Every code base in Git has a master or main branch. This branch is the latest and greatest and most up to date version of your project’s codebase.
Whenever I work on a new feature or fix a bug at my company, I create my own branch which is just my own personal copy of the master branch.
I do all my development in that branch, and then when I have finalized all my changes. We do a code review of my branch and when the team is okay with my changes, I submit a pull request and my supervisors merge my branch into the master branch. And the process repeats.
Git is a really helpful tool and it’s important to know if you’re going to start coding with other people.
In this video, you'll learn:
✅What branches are in Git
✅How to create a branch
✅How to merge a branch
Hope this is helpful!
-Henrik
📁 Sample Code:
Find the sample code used in this tutorial on our GitHub page:
github.com/henrikmdev/branchT...
🎥 Git started tutorial:
• What Is GitHub and How...
=================================================
📚 Stay Tuned for More:
If you found this video helpful, make sure to like and subscribe to our channel for more programming tutorials and tips. We have a lot more exciting content in store for you, so stay tuned!
www.youtube.com/@henrikmdev?s...
👨‍💻 Have Questions?
If you have any questions or want to suggest topics for future videos, please leave a comment below. We love hearing from our viewers and are here to help!
🔔 Turn on Notifications:
Don't forget to ring the notification bell so you never miss an update from us. Stay ahead in your programming journey!
=================================================
💡 Coding Tutorials:
• Coding tutorials
💡 Dev Tool Tutorials:
• Dev tools
📁 Sample Code:
Find the sample code used in our tutorials on our GitHub page:
github.com/henrikmdev/
=================================================
📚 Books
C Programming Language: amzn.to/3uwHmI6
Learning the bash Shell: amzn.to/3Ghr9t2
⚙️ Gear
Webcam - Logitech Brio: amzn.to/47KUtUk
Lighting - Ring Light Clip: amzn.to/49PtgBL
Microphone - AKG Pro Audio P220: amzn.to/47P6Tus
Audio Interface - Focusrite Scarlett 2i2: amzn.to/3QThFZM
Thank you for watching, and happy coding! 💻🧡
-Henrik
Disclaimer: Some of these links are referral links. I may earn a commission if you use them, at no extra cost to you. You're not obligated to use these links, but it would be appreciated. Thanks!

Пікірлер: 31
@henrikmdev
@henrikmdev 10 ай бұрын
Want a programming project to help you practice using git? From no coding experience to building your first app 📘Download my FREE programming guide here: henrikmdev.com/firstapp
@shivambhuskute4713
@shivambhuskute4713 3 күн бұрын
That's really a detailed video, I'm going to subscribe for this quality content
@henrikmdev
@henrikmdev 2 күн бұрын
Glad it was helpful 🙂 feel free to let me know if you have any questions.
@muokinzangi3067
@muokinzangi3067 8 ай бұрын
Very insight video for new beginner who never worked in company or organizations. Thanks
@henrikmdev
@henrikmdev 8 ай бұрын
Glad it helped ☺️
@uccoskun
@uccoskun 7 ай бұрын
very good video, very nice explanation with an example. thank you and please keep doing videos for each problems you got,
@henrikmdev
@henrikmdev 7 ай бұрын
Thank you for the encouragement! I plan to make more helpful videos :)
@user-sd8tj7xk5j
@user-sd8tj7xk5j 3 ай бұрын
Best video till far on git branch and all stuff.
@henrikmdev
@henrikmdev 3 ай бұрын
Thanks! 😊
@parjapticreator
@parjapticreator Ай бұрын
really helpful video
@henrikmdev
@henrikmdev Ай бұрын
Glad it was helpful! 🙂
@dheerajmaske1194
@dheerajmaske1194 2 ай бұрын
thankyou
@henrikmdev
@henrikmdev 2 ай бұрын
You're welcome! 🤗
@singhbaaz4351
@singhbaaz4351 7 ай бұрын
how uat, dev works in branches. do you create different branch, like when clien need to provide uat sign off how it works?
@henrikmdev
@henrikmdev 7 ай бұрын
Sorry, I'm not sure what you mean by "uat"? Can you clarify? It sounds like you're asking how developers use git professionally. I'm actually releasing a video about that this week! Stay tuned!
@software4live
@software4live 4 ай бұрын
He meant UAT (User Acceptance Testing) environment. @@henrikmdev
@favouroladeji3722
@favouroladeji3722 6 ай бұрын
There are two branches, staging and master in remote repo. I only have master in my local repo. However i want to create a new branch from staging. How do i accomplish this
@henrikmdev
@henrikmdev 6 ай бұрын
You need to do a git pull from the remote repo so that staging is in your local repo. When that's done, checkout the staging branch and do "git checkout -b new_branch_name" to make a new branch off of staging. Then you need to push that new branch at some point so that it's in the remote repo, otherwise it will remain local only.
@superhero25e
@superhero25e 10 ай бұрын
Nice vid
@henrikmdev
@henrikmdev 10 ай бұрын
Thanks :)
@superhero25e
@superhero25e 10 ай бұрын
@@henrikmdev np
@MDZAKIRHUSSAINS
@MDZAKIRHUSSAINS 6 ай бұрын
I have one question/doubt: what happens instead of git merge main if it is git pull from *your_new_feature* ?
@henrikmdev
@henrikmdev 6 ай бұрын
Sorry I don't understand your question. Could you provide more context? Git merge and git pull are different git operations. Git merge is when you merge another branch into your branch. Git pull is when you pull the most recent changes in the remote repo into your local repo.
@MDZAKIRHUSSAINS
@MDZAKIRHUSSAINS 6 ай бұрын
@@henrikmdev, Thank you so much. Now, I understood it correctly, about the differences in git pull and git merge. My question was: when I was in your_new_feature branch (from the video example), what might happen if I do git pull instead of git merge main? [ But now it is clear. being in your_new_feature branch if I do git pull then actually I am pulling my own changes to the local repository, But if I want to add main branch changes to my local repository in that case I must be doing git merge main. Am I correct?]
@henrikmdev
@henrikmdev 6 ай бұрын
You got it! In addition to that, git pull also brings in information about other remote branches. So say your coworker created a new remote branch, you need to do a git pull so that your local repo is aware about it. Only after a git pull can you do a git checkout to see his/her branch in your local repo
@MDZAKIRHUSSAINS
@MDZAKIRHUSSAINS 6 ай бұрын
@@henrikmdev, In that case, is that like... let us say *person A* has his/her local repo then if *person A* is doing git pull of his/her coworker's remote repo in his/her own local repo... is that git going to show *only the changes between local repo and pulled remote repo?* and then if he/she wants to merge they must use git merge?
@henrikmdev
@henrikmdev 6 ай бұрын
Yes, on the console if you do a git pull, git will show you only the changes that were brought in to your local repo and your local repo will be the same as the remote. Then you can do a git merge or git rebase to bring someone else's branch changes into yours
@abdotech8995
@abdotech8995 3 ай бұрын
What's the difference between merge (git merge) and merge pull request?
@henrikmdev
@henrikmdev 3 ай бұрын
A git merge merges one branch into your current branch. A pull request is a request to merge one branch into another which allows for other developers to review (and approve) the merge before merging the branch.
@abdotech8995
@abdotech8995 3 ай бұрын
Thanks, that was very helpful
How to Git Clone From GitHub via HTTPS and SSH [2 Ways]
11:11
HenrikM Dev
Рет қаралды 3,3 М.
Git Branching and Merging - Detailed Tutorial
54:28
SuperSimpleDev
Рет қаралды 192 М.
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 57 МЛН
Жайдарман | Туған күн 2024 | Алматы
2:22:55
Jaidarman OFFICIAL / JCI
Рет қаралды 1,8 МЛН
What Is GitHub and How To Use It?
19:14
HenrikM Dev
Рет қаралды 6 М.
How to use GIT when working with a team?
12:16
Ako Dev
Рет қаралды 168 М.
Git Tutorial For Dummies
19:25
Nick White
Рет қаралды 1 МЛН
Git Branches Tutorial
33:20
freeCodeCamp.org
Рет қаралды 239 М.
Git Tutorial for Beginners - Git & GitHub Fundamentals In Depth
43:06
Tech With Tim
Рет қаралды 824 М.
Git It? How to use Git and Github
12:19
Fireship
Рет қаралды 732 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1 МЛН
How To Collaborate On GitHub With VSCode
12:21
Tech With Kazim
Рет қаралды 3,4 М.
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15