Git and GitHub Beginner Tutorial 5 - Branching and Merging

  Рет қаралды 119,681

Automation Step by Step

Automation Step by Step

Күн бұрын

Пікірлер
@westfield90
@westfield90 7 жыл бұрын
I've watched about 3 videos on Git and honestly your tutorials are the only one where I understood it. You explain everything so clearly and at a great pace. I'm so glad I found your channel.
@RaghavPal
@RaghavPal 7 жыл бұрын
I am glad you found it useful. Keep Learning !
@shashanksharma9475
@shashanksharma9475 7 жыл бұрын
True @westfield90
@jeremylam9722
@jeremylam9722 4 жыл бұрын
i really love how you add a little bit of repetition to your videos to make us use what we learnt. It also allows us to understand exactly whats going through in your head. good job well done keep up the good work.
@RaghavPal
@RaghavPal 4 жыл бұрын
You are so welcome Jeremy
@sammy-zo6sl
@sammy-zo6sl 5 жыл бұрын
I liked how you explained everything step-by-step and in a concise manner.
@RaghavPal
@RaghavPal 5 жыл бұрын
Thanks for watching Sammy
@UmeshKumar-ox3zp
@UmeshKumar-ox3zp 6 жыл бұрын
Simplest and best git tutorials for beginners. Good job, Raghav!! Keep posting. Thank you.
@RaghavPal
@RaghavPal 6 жыл бұрын
You're welcome Umesh
@aditimenon2767
@aditimenon2767 Жыл бұрын
Your entire channel is very informative and precise. Much much regards to you Sir.
@RaghavPal
@RaghavPal Жыл бұрын
So happy & humbled to hear that Aditi. Thanks
@vishalpathak8524
@vishalpathak8524 5 жыл бұрын
Hi Raghav, Thanks for Tutorial. You explain in very simple way I understand all git commands properly.
@RaghavPal
@RaghavPal 5 жыл бұрын
Happy to know that Vishal
@rohithdasi
@rohithdasi 4 жыл бұрын
Raghav i had see more then 4 git videos from diffrent persons , but i understand now , thank you..
@RaghavPal
@RaghavPal 4 жыл бұрын
So happy & humbled to know this Rohith
@adityapatel5843
@adityapatel5843 4 жыл бұрын
Clear and to the point. Great video to get started with Git Branching!
@RaghavPal
@RaghavPal 4 жыл бұрын
Thanks Aditya
@andresyesidmorenovilla7888
@andresyesidmorenovilla7888 9 ай бұрын
Excellent tutorial, complete yet succinct and straight to the point. Thank you so much
@RaghavPal
@RaghavPal 9 ай бұрын
Most welcome Andres
@MalluManish
@MalluManish Жыл бұрын
Manish...Thanks for Your hard work and uploading the stuffs for the Community, Really excellent and extraordinary explanation . Thank you Again..Now I can add my framework to git repository...Thank you sir............................
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome. all the best Manish
@kirank5653
@kirank5653 8 жыл бұрын
Hello Raghav, Thank you for nicely tailored Git, web services and Jenkins tutorials....
@RaghavPal
@RaghavPal 8 жыл бұрын
I am glad you found it helpful
@srinivaspklpkl
@srinivaspklpkl 4 жыл бұрын
I have watched so many videos for this, but i got from your video thank you so much
@RaghavPal
@RaghavPal 4 жыл бұрын
So happy to know this Srinivas
@jaminDNB
@jaminDNB Жыл бұрын
Your educational content, Raghav, is top-notch! 🚀 Clear explanations and well-chosen examples make learning a breeze. Thanks for expanding my knowledge. Keep the outstanding work coming! 🌟💻📚
@RaghavPal
@RaghavPal Жыл бұрын
Thanks a ton
@farnaazkauser1993
@farnaazkauser1993 6 жыл бұрын
please dont stop making videos.. u make concepts easy to understand
@RaghavPal
@RaghavPal 6 жыл бұрын
Sure, I will continue this. Thanks Farnaaz
@VijayKumar-eq9ou
@VijayKumar-eq9ou 5 жыл бұрын
Good job brother . Hats off to your way of simplifying the complex things and all your efforts. Thanq very much for all your efforts
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome Vijay
@ramroy5942
@ramroy5942 2 жыл бұрын
I am really a big fan of your style.Thank you uploading the videos
@RaghavPal
@RaghavPal 2 жыл бұрын
Most welcome
@ankitsethia6534
@ankitsethia6534 4 жыл бұрын
Salute to your efforts. Awesome video for anyone to understand. Thanks!
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome Ankit
@srikanthbolisetty1417
@srikanthbolisetty1417 4 жыл бұрын
Thanks, Raghav! Easy to understand.
@RaghavPal
@RaghavPal 4 жыл бұрын
Most welcome Srikanth
@PkStudio56
@PkStudio56 5 жыл бұрын
Very good thanks
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome
@rajeswarimamilla3895
@rajeswarimamilla3895 6 жыл бұрын
Hi Raghav, The way u explained is very clear and understandable and its very useful for us. It could be better if u can upload more videos on the commands like rebase,stash and so on. Thank you in advance
@RaghavPal
@RaghavPal 6 жыл бұрын
Glad to know this Rajeswari I will do more videos soon.
@nooreinfatima4719
@nooreinfatima4719 3 жыл бұрын
It was really helpful. Thanks a lot for such great video.
@RaghavPal
@RaghavPal 3 жыл бұрын
Most welcome Noorein
@RiteshKumar-dx1uz
@RiteshKumar-dx1uz 6 жыл бұрын
Very informative video.
@ishakkhan6233
@ishakkhan6233 7 жыл бұрын
best videos ever
@RaghavPal
@RaghavPal 7 жыл бұрын
Thanks Ishak for watching and learning.
@udaysabbisetty9509
@udaysabbisetty9509 3 жыл бұрын
Awesome explanation
@RaghavPal
@RaghavPal 3 жыл бұрын
Glad you liked it Uday
@kamaboko1
@kamaboko1 7 жыл бұрын
Great tutorial series. Very informative.
@RaghavPal
@RaghavPal 7 жыл бұрын
Thanks for watching
@NipunDavid
@NipunDavid 4 жыл бұрын
At 6:12 why have you used -u orign and not just git push since you are already no the MyNewBranch?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Nipun, yes, you may skip -u here
@sadathossainchowdhury631
@sadathossainchowdhury631 4 жыл бұрын
Excellent Explanation. Can you make video for git feature branch workflow ?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sadat, yes will plan
@wilsoncardoso150
@wilsoncardoso150 6 жыл бұрын
Thank you so much for your time and effort, for sharing your knowledge with us. Thank you and keep the good work.
@RaghavPal
@RaghavPal 6 жыл бұрын
Thanks Wilson, appreciate your message
@kaltube4817
@kaltube4817 2 жыл бұрын
Well Done!
@RaghavPal
@RaghavPal 2 жыл бұрын
Thanks
@harshadaborade5712
@harshadaborade5712 11 күн бұрын
Can you explain pull, push , merge conflicts
@RaghavPal
@RaghavPal 10 күн бұрын
Sure Harshada, will plan a session
@blake4590
@blake4590 7 жыл бұрын
Thank you so much. I really appreciate your helpfulness.
@RaghavPal
@RaghavPal 7 жыл бұрын
You're welcome
@richasingh7723
@richasingh7723 7 жыл бұрын
Hi Raghav,very nice tutorial. I have tried everything which you have showed,I have one doubt what is the difference between master and origin/mater or mynewbranch and origin/mynewbranch.
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Richa, i am happy it helped you. origin refers to the remote repo (url) set as origin. You can set origin with this command git remote set-url origin github.com/USERNAME/OTHERREPOSITORY.git master is the branch. You can also use any other branch .
@shubhamagarwal2548
@shubhamagarwal2548 4 жыл бұрын
Thank you very much for this tutorial
@RaghavPal
@RaghavPal 4 жыл бұрын
You are welcome Shubham
@ladyharriet4136
@ladyharriet4136 7 жыл бұрын
Thank you so much, explain everything clearly.
@RaghavPal
@RaghavPal 7 жыл бұрын
Thanks for watching.
@sklondon5855
@sklondon5855 2 жыл бұрын
Hi Raghav sir can you please share the step to follow all activity in IDE instead of command prompt
@RaghavPal
@RaghavPal 2 жыл бұрын
I will plan on this Shaira
@ImranHossan_myGardening
@ImranHossan_myGardening 7 жыл бұрын
Nice explanation
@vasilevictordurlesteanu2435
@vasilevictordurlesteanu2435 3 жыл бұрын
Hello Raghav Pal! First of all, thank you for the videos you upload, I have a question with regards to branching and merging: Why the branching and merging are not seen as contributions on the GitHub profile page (the green squares), or should those be seen at all? The reason I ask, is that I want to track my progress, and I want it to be visible on the contributions calendar bar. Thank you!
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Vasile, I am not too sure and will need to get some online help on this
@philb4462
@philb4462 Жыл бұрын
I have been recommended to set up a branch for each developer where I work. Is that something you consider to be good practice? It's different to your example here where you have code being written for a specific purpose and then deleting the branch when the objectives have been achieved. Our branches are permanent.
@RaghavPal
@RaghavPal Жыл бұрын
Phil Whether or not it is good practice to have a permanent branch for each developer depends on a number of factors, including the size and complexity of your project, the number of developers working on the project, and your team's workflow. *Pros of having a permanent branch for each developer:* *Improved isolation:* Each developer's code is isolated from the code of other developers, which can help to prevent conflicts and merge issues. *Increased visibility:* It is easy to see what code each developer is working on and what changes they have made. *Enhanced collaboration:* Developers can easily share code and collaborate on features by merging their branches into a shared development branch. *Cons of having a permanent branch for each developer:* *Increased complexity:* Managing a large number of permanent branches can be complex and time-consuming. *Reduced visibility of the codebase:* It can be difficult to get a holistic view of the codebase when there are many different branches. *Increased risk of merge conflicts:* Merge conflicts are more likely to occur when there are many different branches. *My recommendation:* I would recommend that you start with a temporary branch for each developer. This will give you the benefits of isolation, visibility, and collaboration, without the complexity of managing a large number of permanent branches. Once you have a good understanding of how your team works and how your project is structured, you can decide whether or not to switch to permanent branches. If you do decide to use permanent branches, I recommend that you implement some best practices to help manage them effectively. *Best practices for managing permanent branches:* *Use a branching strategy:* Define a branching strategy that outlines how branches will be used and when they will be merged into the main development branch. *Implement code reviews:* Require all code changes to be reviewed by another developer before being merged into the main development branch. *Use a merge tool:* Use a merge tool to help resolve merge conflicts. *Automate testing:* Automate testing to ensure that code changes do not break the existing functionality. Having a permanent branch for each developer can be a good practice, but it is important to weigh the pros and cons carefully before making a decision. If you do decide to use permanent branches, be sure to implement some best practices to help manage them effectively
@philb4462
@philb4462 Жыл бұрын
@@RaghavPal Thank you so much! 🙂🙂🙂👍👍👍
@bhakta_rg
@bhakta_rg 5 жыл бұрын
thanks Raghav for the tutorial
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome
@anjalirawat5599
@anjalirawat5599 5 жыл бұрын
HI Raghav ,Thanks for ur videos.I have one query, like if I am making changes to my file everyday,,, eg ver1,ver 2,ver3 and then suddenly while working on ver3 i wanted to see my previous file ver1, how will i get that.Also what will happen if i keep on modifying same file without committing it.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Anjali, you can always go back to any previous commit. I believe I have explained that in some video. Every commit has a commit id. If you run command git log You can see the commits and id. You can do git checkout "commidid" Here are more links to help - stackoverflow.com/questions/4114095/how-do-i-revert-a-git-repository-to-a-previous-commit
@anjalirawat5599
@anjalirawat5599 5 жыл бұрын
@@RaghavPal Thanks Raghav for the reply. Yeah you explained it in "tag" video.I came across that video later ..thankyou
@id14u2
@id14u2 7 жыл бұрын
great video any video for resolving conflicts using gitbash thanks
@RaghavPal
@RaghavPal 7 жыл бұрын
what is the issue you are facing
@id14u2
@id14u2 7 жыл бұрын
if two users edit the same file there will a conflict and it will not merge
@gandrabbhai5288
@gandrabbhai5288 4 жыл бұрын
Hii sir can we use -b for direct create a branch and log into it and after delete branch locally we also use git push origin :branchname for dlt remote ly
@RaghavPal
@RaghavPal 4 жыл бұрын
You can
@sumanp1638
@sumanp1638 6 жыл бұрын
Hi Sir, Could you please explain the concept of resolving merging conflicts on GIT?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Suman, I will try to create a session soon.
@shireeshkantharaj7175
@shireeshkantharaj7175 5 жыл бұрын
Quick Question: The code in Git does not match the actual code in production, how to over come this? what strategy should be included?
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Shireesh, are they on 2 separate branches, you can merge the branches. Do watch merge and rebase video kzbin.info/www/bejne/gYiki59ohq12apY
@BengaliStrings
@BengaliStrings 4 жыл бұрын
Raghav bro, if you could give the steps in windows machine also it would be very helpfull
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sourav, the commands should work on git bas from windows too. Was there anything specific that you could not follow on windows. Pls let me know.
@BengaliStrings
@BengaliStrings 4 жыл бұрын
@@RaghavPal yes Raghav, If its ok I can send screenshot and also discuss in person about it. I have dropped an email please kindly check
@RaghavPal
@RaghavPal 4 жыл бұрын
Ok Sourav
@SahilKhan-mx1rp
@SahilKhan-mx1rp 4 жыл бұрын
Raghav - How can we undelete the deleted Branch in case we need it. Pls suggest.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sahil, you can use the *git reflog* command. Check this - confluence.atlassian.com/bbkb/how-to-restore-a-deleted-branch-765757540.html
@pradeeptadas2144
@pradeeptadas2144 7 жыл бұрын
Nice videos Raghav....can we connect database tools like SQL_Developer with GIT
@RaghavPal
@RaghavPal 7 жыл бұрын
Thanks Pradeep for liking the videos. Yes, we can connect Git with SQL developer. This article may be helpful : galobalda.wordpress.com/2014/04/09/sql-developers-interface-for-git-interacting-with-a-github-repository-part-1/
@sharmilashaik356
@sharmilashaik356 4 жыл бұрын
Please share me any high level process for GIT branching and tagging with flow diagram
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sharmila, sure, I will do a session
@sharmilashaik356
@sharmilashaik356 4 жыл бұрын
hi, I am working on one RFP, need the w information.@@RaghavPal . 1.why we want to create new git branch instead of old branch 2.how we can able to handle fail safe mechanism incase of any wrong commits to the repoistory 3. How will copy the changes from master branch to new branch by using tagging/merging 4.jenkin job updated to add new git parameters These 4 points I need to present with any diagram
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sharmila, 1. We create a new branch mostly to develop a new feature. So that if anything goes wrong we can revert to the original branch 2. This is where we try to create new feature in new branch so our original work is intact in the older branch, Also we have option to revert to any earlier state. Tags will be very helpful here. Check the video on tags. You can easily revert to any older tags in case any problem occurs 3. There is a video on Tags and Merging. Pls check 4. If configured Jenkins will take the latest changes from git. Not sure what else you meant here
@monikadixit2337
@monikadixit2337 3 жыл бұрын
Sir but if i have two or more repo then how does the git know to which repo this branch will be pushed?
@RaghavPal
@RaghavPal 3 жыл бұрын
We provide branch name while pushing
@amarnath1494
@amarnath1494 8 ай бұрын
Hi Raghav , To create a new file, $ Touch (or) dir> "", which on e to use?
@RaghavPal
@RaghavPal 8 ай бұрын
Amarnath To create a new file in a Linux environment, you have two options: 1. Using `touch`: - The `touch` command creates a new, empty file. - The basic syntax is: ``` touch ``` - Replace `` with the desired name for your file. - Remember that most Linux filesystems are case-sensitive, so ensure that the filename is spelled exactly as you want it. 2. Using `mkdir` (for directories): - The `mkdir` command creates a new directory (folder). - If you want to create a new file within a specific directory, you can first create the directory using `mkdir` and then create the file inside it. - The basic syntax for creating a directory is: ``` mkdir ``` - Replace `` with the desired name for your directory. - After creating the directory, you can use `touch` to create files inside it. Remember that `touch` is specifically for creating files, while `mkdir` is for creating directories. Choose the appropriate command based on your needs For example: - To create a new file named "mytext.txt": ``` touch mytext.txt ``` - To create a new directory named "mydir" and then create a file inside it: ``` mkdir mydir touch mydir/myfile.txt ``` hope it helps
@amarnath1494
@amarnath1494 8 ай бұрын
Thanks for the explanation and your time Raghav
@chetna_vlog
@chetna_vlog 7 жыл бұрын
Hello Raghav, Do you have any tutorial to migrate from CVS to GIT or CVS to GITLab?
@RaghavPal
@RaghavPal 7 жыл бұрын
No Chetna
@sharatchandra2045
@sharatchandra2045 5 жыл бұрын
Good Tutorial
@RaghavPal
@RaghavPal 5 жыл бұрын
Thanks for watching Sharat
@rockkersify
@rockkersify 3 жыл бұрын
Do we need to use git branch if we are using checkout ?
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Vinod, yes, you need to do it on a branch
@OddBallTrails
@OddBallTrails 5 жыл бұрын
Hello Raghav. Do you have any tutorial on merge and rebase. Please help, these both are very confusing to me.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Mukesh, I will try to do a session on this.
@OddBallTrails
@OddBallTrails 5 жыл бұрын
@@RaghavPal thank you :) please do for sure....this is a must know for me...thanks again.
@imtiazdahar8451
@imtiazdahar8451 4 жыл бұрын
I have confusion in branches, Suppose, we have created two branches named "Master" and "MyBranch" and what if we have two same files in both branches and we update them parallelly in both branches. Now, we have committed our changes in both branches and we want to merge "MyBranch" into "Master" branch, what will happen? If merge conflict occurs then how can we remove those merge conflicts because we might have lot of changes in both files and finding both changes could be difficult. Suppose, we found errors in "Master" branch and some other errors in "MyBranch" and we have fixed both errors on both side, After that, we merge branches then how can we remove merge conflict. I Hope you got my point, I'm new in Git and GitHub. I look forward to hear from you.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Imtiaz, there are ways to handle the merge conflicts and changes. I will plan to create a session on this
@imtiazdahar8451
@imtiazdahar8451 4 жыл бұрын
@@RaghavPal Thank you very much and I look forward to see you again in an other video.
@walidnaceri9665
@walidnaceri9665 4 жыл бұрын
Thank you very much for your explanation but what is the purpose of the branch?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Walid, Branch is like a parallel version of the code that can be modified without affecting the other versions.
@a0d1i2
@a0d1i2 5 жыл бұрын
I got an error while pushing after merge. The error is " rejected. master -> master (fetch first). Error: failed to push some refs to the location".
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Aditya, Did you trying doing a fetch first. This will help you - stackoverflow.com/questions/28429819/rejected-master-master-fetch-first/28429887
@dasigovardhani3663
@dasigovardhani3663 6 жыл бұрын
Hi Are you taking any online classes for Ansible, kubernets chef , aws pls let me know
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Dasi, not currently, may do it in coming 2 months
@mohammedzakaria8783
@mohammedzakaria8783 4 жыл бұрын
How can we run a test project from the branch? I am confused. Thank you in advance.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Mohammed, you just have to checkout the branch and then all commands will run on that branch
@maddysunshine4173
@maddysunshine4173 7 ай бұрын
Can git repo be managed without the command line as in if I have to integrate any application so that i can use it as version control and I already have a public online repository available, so can i manage to push the code on git
@RaghavPal
@RaghavPal 7 ай бұрын
Maddy You can manage a Git repository without using the command line. Here are a couple of ways to achieve this: 1. GitHub Desktop: - Use [GitHub Desktop](docs.github.com/desktop/contributing-and-collaborating-using-github-desktop) to interact with GitHub using a graphical user interface (GUI). - It allows you to perform most Git commands (e.g., push, pull, clone, commit) directly from your desktop. - Visual confirmation of changes makes it user-friendly. 2. GitHub Website: - If you prefer a web-based approach, use the GitHub website. - Create, manage branches, commit changes, and open pull requests-all without the command line. Choose the method that suits your workflow best
@manikanthkommoju3176
@manikanthkommoju3176 7 жыл бұрын
as i am from Linux admin i can understand easily but lag in few terminologies like branches commit clone etc as i am unfamiliar with these terms
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Manikanth, i created this series for beginners and i hope you should be able to get most of the things even if you do not know it earlier. In case you still want some deeper knowledge or info, you can search for the particular term on internet. You will find all the info you need.
@dasariganesh6161
@dasariganesh6161 5 жыл бұрын
Hi Raghav, Can you help me: fatal: bad numeric config value 'exit' for 'color.ui': invalid unit -->How to resolve this? I am using windows.
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Dasari, Run this command git config --global color.ui false and then try OR Run command git config --global --edit Then in the editor change the value of "status" to "auto" and save.
@pjmclenon
@pjmclenon Жыл бұрын
hello i am super confused there is 3 branches --main, MyNewBranch, master--where does main come from? --im so confused mixed up--anyway master is merged and up to date on local and remote repos Lisa
@RaghavPal
@RaghavPal Жыл бұрын
Hi The "main" branch is the default branch name for newer Git repositories created on GitHub. In the past, "master" was the default branch name, but GitHub recently changed it to "main" to avoid any language that may carry a negative connotation. Regarding the confusion with branches, it's important to keep in mind that each branch represents a different line of development within a Git repository. The "master" branch is typically used as the main branch of development, where all changes are merged into, and should always represent the latest stable release of the code. In your case, it seems like you created a new branch called "MyNewBranch" to make some changes to the code. Once you were done with your changes, you merged the changes from "MyNewBranch" into "master" and pushed the changes to the remote repository. This should have updated the "master" branch on the remote repository to reflect the changes you made on the "MyNewBranch" branch. If the "master" branch on the remote repository is not reflecting the changes you made, it's possible that the push did not go through correctly. You can try running the command "git log" to see the commit history and confirm that the changes were indeed merged into the "master" branch before attempting to push again.
@venkatesh9290
@venkatesh9290 7 жыл бұрын
Can you please show the push command that how to use it in git. please
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi Venkatesh, push command is covered in the session - kzbin.info/aero/PLhW3qG5bs-L8OlICbNX9u4MZ3rAt5c5GG
@pjmclenon
@pjmclenon Жыл бұрын
you are on a mac i am on a windows machine how do i create a file at the cli touch doesnt work here ok? Lisa thxz
@RaghavPal
@RaghavPal Жыл бұрын
Hi On a Windows machine, you can create a new file using the "type nul > filename" command in the Command Prompt or PowerShell. Here's an example: Open Command Prompt or PowerShell. Navigate to the directory where you want to create the file using the "cd" command. Type "type nul > filename.txt" and press Enter, replacing "filename" with the name you want to give the file and ".txt" with the extension you want to use. This will create a new empty file with the specified name and extension in the current directory ------------------------------------------ Another option is to install git bash on your windows system. using git bash command line, you will be able to run mac/linux commands To install Git Bash on Windows, you can follow these steps: Go to the Git for Windows download page: gitforwindows.org/ Click the "Download" button to download the Git for Windows installer. Run the installer and follow the prompts to install Git Bash on your system. Once the installation is complete, you can launch Git Bash by searching for "Git Bash" in the Windows Start menu. Alternatively, if you prefer to use a package manager to install Git Bash, you can use Chocolatey: Install Chocolatey by following the instructions on their website: chocolatey.org/install Open a command prompt or PowerShell window as an administrator. Type the following command and press Enter to install Git Bash: choco install git Wait for the installation to complete, and then you can launch Git Bash by searching for "Git Bash" in the Windows Start menu.
@pjmclenon
@pjmclenon Жыл бұрын
thank you i apprecite it i will try --Lisa--
@bmkrissh8714
@bmkrissh8714 5 жыл бұрын
How to check - which is active branch if there is more than one?
@bmkrissh8714
@bmkrissh8714 5 жыл бұрын
OK , git branch --list , is the command. * shows active branch
@abdulwadoodaziz3371
@abdulwadoodaziz3371 5 жыл бұрын
Amazing
@RaghavPal
@RaghavPal 5 жыл бұрын
Thanks Abdul
@andrekelvin2318
@andrekelvin2318 6 жыл бұрын
What if you want to add different directories in a repository like school management system which have multiple modules each module is one software on it's own(one file directory on it's own) is it best to add each one in different branches ?
@RaghavPal
@RaghavPal 6 жыл бұрын
Yes you can create branches
@sweetthirty2
@sweetthirty2 Жыл бұрын
git add -A , git add* and git add . all are the same commands??
@RaghavPal
@RaghavPal Жыл бұрын
No, `git add -A`, `git add *`, and `git add .` are not exactly the same commands, although they have similarities. Let's break down each one: 1. **`git add -A`:** - This command stages all changes, including modifications, deletions, and new files across the entire repository. It stages everything. 2. **`git add *`:** - This command stages all changes and new files in the current directory. However, it does not consider files or changes in subdirectories. 3. **`git add .`:** - Similar to `git add *`, this command stages all changes and new files in the current directory. However, it also stages modifications in subdirectories.
@arunkumarsanthanam8696
@arunkumarsanthanam8696 5 жыл бұрын
Hi Raghav, Thanks for your video, I have tried above commands in my machine. While running git push -u origin branch-name, I am getting fatal: protocol 'https' is not supported this error. How to resolve this. Thanks (I am using windows)
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Arun, pls re-check your repo url.
@arunkumarsanthanam8696
@arunkumarsanthanam8696 5 жыл бұрын
@@RaghavPal ya Raghav.... git remote add origin was not helped for me.. I tried with git remote set-url command.. Its works as expected
@RaghavPal
@RaghavPal 5 жыл бұрын
Glad to know this Arun
@kailashsahoo2607
@kailashsahoo2607 6 жыл бұрын
HI Raghav, Can you please the PPT (docker,git) in your github so that it will be very helpful for us.
@kailashsahoo2607
@kailashsahoo2607 6 жыл бұрын
*share
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Kailash, do not have them handy now
@pjmclenon
@pjmclenon Жыл бұрын
hello why do i have enter my passowrd and username each time? its so diffuct to paste the passowrd it doesnt always paste it--can you know how to automate it so we are alrwedy reconized as looged in? Lisa
@RaghavPal
@RaghavPal Жыл бұрын
will need more details. also pls refer the time in video this is related to
@OddBallTrails
@OddBallTrails 5 жыл бұрын
creating a new branch and checking out to it.... let's make the command more compact "git checkout -b new_branch"
@RaghavPal
@RaghavPal 5 жыл бұрын
thanks for sharing Mukesh
@lifewithsuryanvi9019
@lifewithsuryanvi9019 7 жыл бұрын
hello Ragav...when i am pushing my project (console application of .net) on github..its show me timeout ..please suggest what should i do and i can push folder vise..?
@RaghavPal
@RaghavPal 7 жыл бұрын
do you get any errors in logs. Are you pushing large files. You can Increase the Git buffer size to the largest individual file size of your repo: git config --global http.postBuffer 157286400
@rajeevghosh2000
@rajeevghosh2000 6 жыл бұрын
1. is it possible that that from my current branch I want to push to remote master repo instead of pushing to remote branch. I am in branch 1 and using this cmd "git push origin master". Also, from master(local) to master(remote), how the merge conflict works? I donot see any notification for Create Pull and Merge request
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Rajeev, you will have to pull, push with branches as per the concepts. This link will help on how to handle merge conflicts stackoverflow.com/questions/161813/how-to-resolve-merge-conflicts-in-git
@Subodhhyd
@Subodhhyd 4 жыл бұрын
I want to keep the a branch permanently, it is possible?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Subodh, what do you mean by that. The branch remains unless you delete it.
@sickbro3703
@sickbro3703 7 жыл бұрын
Raghav - your videos are awesome, though for the life of me I cannot figure out the following error when it comes to checking out a branch: `error: pathspec 'foo' did not match any file(s) known to git.` I've been on stackoverflow, git-scm, github and googled it a million times. When I run `git branch -r` however, I see both the master branch and my foo branch: `origin/foo` and `origin/master`. I'd love you forever if you have any input or can direct me to a solution! Thanks in advance
@RaghavPal
@RaghavPal 7 жыл бұрын
Hi, glad you liked it. Did you try to do git fetch and git checkout before checking out branch
@pjmclenon
@pjmclenon Жыл бұрын
i pushed the bracnjh master and it does not update on github like the merge on my local machine why?
@RaghavPal
@RaghavPal Жыл бұрын
There could be multiple reasons why the branch didn't update on GitHub after pushing the changes. Here are a few things you can check: Check if you pushed the changes to the correct repository and branch. Ensure that you have the appropriate permissions to push to the repository. Verify that your internet connection is stable and there were no errors during the push. Check if there are any conflicts between your local branch and the remote branch on GitHub. If there are any conflicts, you'll need to resolve them before the changes can be merged. If you have checked all of the above and the issue persists, you can try force pushing the changes to the remote repository. However, this should only be done as a last resort since it can potentially overwrite other changes in the repository
@biswajitsahu3420
@biswajitsahu3420 5 жыл бұрын
Thanks ...
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome Biswajit
@tusharpimple7483
@tusharpimple7483 6 жыл бұрын
hey raghav, how can i create a branch in existing repo.?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Tushar, you can do as shown in the video. What issue did you face.
@tusharpimple7483
@tusharpimple7483 6 жыл бұрын
hey raghav, i already have 7 existing repo. i am unable to create branch in a particular repo. and 2nd que. is when we add empty directory in a branch why do we need to create .gitignore file? what is the meaning of .?
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Tushar, in .gitignore file we generally give the items that we do not want to go to the repo. For e.g. if you have a project and it has a folder that contains images in .png ext. And you do not want this to go to the repo as it will increase the repo size, you can give *.png in .gitignore file.
@tusharpimple7483
@tusharpimple7483 6 жыл бұрын
thanks raghav
@pallavisharma6682
@pallavisharma6682 4 жыл бұрын
sir i want to know that,I don’t have any idea about coding And I did MCA,so Am i able to become a devops engg??
@RaghavPal
@RaghavPal 4 жыл бұрын
Yes you can, You can start now, learn what all is needed. Can take help from here - automationstepbystep.com/
@PrasannaMoharanalipp-prasanna
@PrasannaMoharanalipp-prasanna 6 жыл бұрын
Hi , I got this error while putting git push -u origin branch1 . before it i was facing key gen issue & i resolved it but now again facing this branch pushing issue . please help me on this . git push -u origin branch1 error: src refspec branch1 does not match any error: failed to push some refs to 'my repo link '
@RaghavPal
@RaghavPal 6 жыл бұрын
Hi Prasanna, did you commit before pushing. You need to do git add & git commit before pushing. stackoverflow.com/questions/4181861/src-refspec-master-does-not-match-any-when-pushing-commits-in-git
@varsha5477
@varsha5477 2 жыл бұрын
error: pathspec 'master' did not match any file(s) known to git I am getting this error whenever I use the git checkout master.. Pls help😞😞
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Varsha, pls check this discussion stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn
@varsha5477
@varsha5477 2 жыл бұрын
@@RaghavPal No sir, in my gitbash while creating a repo master branch was not added automatically.. so in another webpage of stackoverflow someone said... "master is just the name of a branch, there's nothing magic about it except it's created by default when a new repository is created. You can add it back with git checkout -b master.".. so I did this and it worked but is it true that master branch is not so important?
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Varsha, as said, master is just a branch, just that it gets created at 1st, you can rename it too
@varsha5477
@varsha5477 2 жыл бұрын
@@RaghavPal ok sir, thank you
@ishakkhan6233
@ishakkhan6233 7 жыл бұрын
can i merge branch with login page ? and how please explani
@RaghavPal
@RaghavPal 7 жыл бұрын
branch with login page? i did not exactly understand. You can merge any branch with other branch like master.
@farnaazkauser1993
@farnaazkauser1993 6 жыл бұрын
How to merge two branches of different repositories?
@RaghavPal
@RaghavPal 6 жыл бұрын
I will check and plan to do a session on this.
@sushantkumar6755
@sushantkumar6755 4 жыл бұрын
Raghav, info that you delivered was totally worth it but a got an issue in the last 2 minutes. I am using windows 7 (32 bit), error says; master->master (fetch first). error: failed to push some refs to 'github......' Please help me short out this issue.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sushant, looks like there were some new commits and you will have to pull first before pushing. You may also have to do a rebase but do with caution. This can help stackoverflow.com/questions/24114676/git-error-failed-to-push-some-refs-to-remote
@quincyg.8337
@quincyg.8337 5 жыл бұрын
why I could not git push after I successfully typed git merge new_branch there, also the delete branch both 2 lines commands doesn't work in my laptop, could anyone let me know why, thx
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Quincy, pls see if this helps - stackoverflow.com/questions/13597494/git-merge-and-push
@sunils3044
@sunils3044 7 жыл бұрын
May i knw what is solution for below Error while pushing to git hub ---------------------------------------------- $ git push -u origin branchnew Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
@RaghavPal
@RaghavPal 7 жыл бұрын
hi Sunil, Check this stackoverflow.com/questions/12940626/github-error-message-permission-denied-publickey stackoverflow.com/questions/38556096/github-permission-denied-publickey-fatal-could-not-read-from-remote-reposit
@pjmclenon
@pjmclenon Жыл бұрын
PS C:\Users\Main\Desktop eact\test_repo2> git checkout master Already on 'master' Your branch is up to date with 'origin/master'. PS C:\Users\Main\Desktop eact\test_repo2> --i am really more consfused i tried to create a main bracnh which it did but whn i switch to master it says its already the master --how come in github main is not merged whaterver ok whatebv
@RaghavPal
@RaghavPal Жыл бұрын
It seems like you have created a new branch called "main" locally but haven't pushed it to the remote repository on GitHub. Therefore, on GitHub, the default branch is still "master". When you switched to the "master" branch, Git is telling you that you are already on the latest version of the "master" branch that is in the remote repository. To merge your changes from the "MyNewBranch" branch into the "master" branch, you need to: Make sure you are on the "master" branch locally: git checkout master Merge the changes from "MyNewBranch" into "master": git merge MyNewBranch Push the changes to the remote repository on GitHub: git push origin master After these steps, the changes from "MyNewBranch" should be merged into the "master" branch both locally and on the remote repository.
@pjmclenon
@pjmclenon Жыл бұрын
ok i will check
@Subodhhyd
@Subodhhyd 4 жыл бұрын
What if we do not do merge?
@RaghavPal
@RaghavPal 4 жыл бұрын
The changes will not come to the parent or master branch
@pjmclenon
@pjmclenon Жыл бұрын
This branch is 2 commits ahead, 2 commits behind main. ----this is what it says in my master and MyNewBranch--how is this possible? on my local it says main IS master --i dont unberstand ok Lisa
@RaghavPal
@RaghavPal Жыл бұрын
It's possible to have the message "This branch is 2 commits ahead, 2 commits behind main" if you have made changes in both the master and MyNewBranch branches, but haven't merged those changes to the main branch yet. When you create a new branch from an existing branch (in your case, you created MyNewBranch from main), the new branch will initially have the same content as the original branch. Any changes you make in the new branch won't automatically be reflected in the original branch until you merge the changes. If you made changes in both the master and MyNewBranch branches, those changes are independent of each other until you merge them into the main branch. So, if you switch to the master branch and see the message "This branch is 2 commits ahead, 2 commits behind main," it means that the master branch has two commits that haven't been merged into the main branch, and two commits from the main branch that haven't been merged into the master branch. To resolve this, you can merge the changes from both branches into the main branch so that all the changes are in one place
@pjmclenon
@pjmclenon Жыл бұрын
@@RaghavPal thank you i will check
@gaojianjin
@gaojianjin 8 жыл бұрын
Your video and audio explanation is not in sync at end part. But thanks for the video anyway.
@RaghavPal
@RaghavPal 8 жыл бұрын
thanks for liking. I did review it again, did not find anything out of sync. Hope this is fine.
@zulfquarmohammed3871
@zulfquarmohammed3871 5 жыл бұрын
hi addVideo 5:- Git and GitHub Beginner Tutorial 5 - Branching and Merging = Today we will learn 1. What are branches :-we create branches we do perform testing and then only we add folders to master branch so that whole functinality don’t get effected Go to cmd prompt-go to path of folder in gitnow u r in folderenter git statusnothing to commit tree is clean 2. How to create branchnow add branch by cmd git branch mynew branch 3. How to checkout branch to start working on branch u have to check out using cmd git checkout branchnamenow whatever changes u make to folder will go to project folder  now add text.txt file in the foldergit statusgit add .  git commit -m “added text.xtxt file”git stautus nothing to commit git push -u origin mybranch-> now u have two branches one master and mynewbranch in new branch only u have test.txt if cmd git checkout master in folder also u don’t have test.txt file 4. How to merge branch to master  u have to checkout master and then merge mynewbranch cmd git checkout mastergit merge mynewbranch git push -u origin master 5. How to delete branch (local and remote) git branch -d “branch name” - delete from local git push origin -delete “branch name” - delete from remote
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Zulfquar, will check this
@pjmclenon
@pjmclenon Жыл бұрын
C:\Users\Main\Desktop eact\test_repo2>git push -u origin MyNewBranch fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. C:\Users\Main\Desktop eact\test_repo2>--did you fforget previous steps? it doesnt work Lisa
@RaghavPal
@RaghavPal Жыл бұрын
It seems like Git is not able to find the remote repository called 'origin'. Here are a few things you can check: Make sure that you have created a remote repository called 'origin' on a Git hosting service like GitHub, GitLab, or Bitbucket. Check if you have added the remote repository to your local Git repository. You can do this by running the following command: git remote -v This will show you a list of remote repositories that your local Git repository is connected to. Make sure that 'origin' is listed there. If 'origin' is not listed when you run the git remote -v command, you can add it using the following command: git remote add origin Replace with the URL of your remote repository. Once you have added the remote repository, you can try pushing your branch again using the command: git push -u origin MyNewBranch Make sure to replace 'MyNewBranch' with the name of your branch.
@jimferko9375
@jimferko9375 4 жыл бұрын
Hi Raghav, great tutorial. All good. However on my git commands : 1.-git push -u origin master and 2.git push origin --delete My NewBranch Authentication with username and Password are still required Note: I have configured credentials with commands a) git config --global user.email "yourGitHub@email.com" b)git config --global user.name "yourGitHubusername" Plus am receiving an email : Basic authentication using a password to Git is deprecated and will soon no longer work.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Jim, I will update this with a new session
@rajeshdevan6051
@rajeshdevan6051 4 жыл бұрын
Hi Raghav, for merging master and MyNewBranch i am getting this error ! [rejected] master -> master (fetch first) error: failed to push some refs to 'github.com/rajeshgithu/Repo2.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details. Please suggest me the solution.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Rajesh, You can fetch pull master first and then do the merge
@rajeshbe2234
@rajeshbe2234 4 жыл бұрын
@@RaghavPal Ok Raghav, Let I do as per your instructions. Thanks.
@pjmclenon
@pjmclenon Жыл бұрын
totally confuised why is there a main? there is no main on my local machine--i do not underatnd-- i cannot push to main cuz there is no main on my computer very lost whatever Lisa--its 2023 and its so confusng to fiund up to date lessons theey are all mixed up in versions
@RaghavPal
@RaghavPal Жыл бұрын
have replied on your earlier comment
@gourangasamal
@gourangasamal 4 жыл бұрын
Hi Raghav, Thanks for Tutorial. You explain in very simple way I understand all git commands properly.
@RaghavPal
@RaghavPal 4 жыл бұрын
You are most welcome Gourang
@karishma08....20
@karishma08....20 27 күн бұрын
Amazing explanation
@RaghavPal
@RaghavPal 27 күн бұрын
Glad it was helpful Karishma
@rocksneha059
@rocksneha059 2 жыл бұрын
awesome explanation
@RaghavPal
@RaghavPal 2 жыл бұрын
Thanks Neha
Git and GitHub Beginner Tutorial 6 - How to send email from GitHub
3:51
Automation Step by Step
Рет қаралды 53 М.
Git Merge vs Git Rebase for Beginners
22:24
Automation Step by Step
Рет қаралды 104 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 15 МЛН
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 66 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Git Branching and Merging - Detailed Tutorial
54:28
SuperSimpleDev
Рет қаралды 228 М.
Git and GitHub Beginner Tutorial 7 - Git Tags - what, why, when and how
10:42
Automation Step by Step
Рет қаралды 209 М.
Git and GitHub Beginner Tutorial 1 - Introduction
13:06
Automation Step by Step
Рет қаралды 204 М.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,3 МЛН
Introduction to Git - Branching and Merging
28:48
David Mahler
Рет қаралды 490 М.
Git Branches Tutorial
33:20
freeCodeCamp.org
Рет қаралды 255 М.
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker
32:31
TechWorld with Nana
Рет қаралды 1,6 МЛН
GitHub Actions Step by Step DEMO for Beginners
23:17
Automation Step by Step
Рет қаралды 97 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН