Git and GitHub Beginner Tutorial 5 - Branching and Merging

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • Git and GitHub Beginner Tutorial 5 - Branching and Merging
    Today we will learn
    -----------
    1. What are branches
    2. How to create branch
    3. How to checkout branch
    4. How to merge branch to master
    5. How to delete branch (local and remote)
    _________________________________________
    Step 1 : Create branch
    git branch “branch name”
    Step 2 : Checkout branch
    git checkout “branch name”
    Step 3 : Merge new branch in master branch
    git merge “branch name”
    Step 4 : Delete branch
    git branch -d “branch name” - delete from local
    git push origin -delete “branch name” - delete from remote
    _______ ONLINE COURSES TO LEARN _______
    Visit - automationstep...
    ----------- UI TESTING -----------
    Selenium Beginners - bit.ly/2MGRS8K
    Selenium Java Framework from Scratch - bit.ly/2N9xvR6
    Selenium Python - bit.ly/2oyMp5x
    Selenium Tips - bit.ly/2owxc50
    Selenium Builder - bit.ly/2MKNtlq
    Katalon Studio - bit.ly/2wARFdi
    Robot Framework - bit.ly/2Px6Ue9
    ----------- API TESTING -----------
    Web Services (API) - bit.ly/2MGafL7
    SoapUI - bit.ly/2MGahmd
    Postman - bit.ly/2wz8LrW
    General - bit.ly/2PYdwmV
    ----------- MOBILE TESTING -----------
    Mobile Playlist - bit.ly/2PxpeUv
    ----------- CI | CD | DEVOPS -----------
    Jenkins Beginner - bit.ly/2MIn8EC
    Jenkins Tips & Trick - bit.ly/2LRt6xC
    Docker - bit.ly/2MInnzx
    ----------- VERSION CONTROL SYSTEM -----------
    Git & GitHub - bit.ly/2Q1pagY
    ----------- PERFORMANCE TESTING -----------
    JMeter Beginner - bit.ly/2oBbtIU
    JMeter Intermediate - bit.ly/2oziNVB
    JMeter Advanced - bit.ly/2Q22Y6a
    JMeter Tips & Tricks - bit.ly/2NOfWD2
    Performance Testing - bit.ly/2wEXbLS
    ----------- JAVA -----------
    Java Beginners - bit.ly/2PVUcXs
    Java Tips & Tricks - bit.ly/2CdcDnJ
    ----------- MAVEN -----------
    Maven - bit.ly/2NJdDRS
    ----------- OTHERS -----------
    Redis- bit.ly/2N9jyCG
    Misc - bit.ly/2Q2q5xQ
    Tools & Tips - bit.ly/2oBfwoR
    QnA Friday- bit.ly/2NgwGpw
    Sunday Special - bit.ly/2wB23BO
    Ask Raghav- bit.ly/2CoJGWf
    Interviews - bit.ly/2NIPPxk
    All Playlists - bit.ly/2LSiezA
    ----------- Follow -----------
    Facebook - / automationstepbystep
    Twitter - / automationsbs
    TH-cam - / automationstepbystep
    You can support my mission for education by sharing this knowledge and helping as many people as you can.

ความคิดเห็น • 224

  • @westfield90
    @westfield90 7 ปีที่แล้ว +46

    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 ปีที่แล้ว +6

      I am glad you found it useful. Keep Learning !

    • @shashanksharma9475
      @shashanksharma9475 6 ปีที่แล้ว +1

      True @westfield90

  • @jeremylam9722
    @jeremylam9722 4 ปีที่แล้ว +3

    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 ปีที่แล้ว +3

    I liked how you explained everything step-by-step and in a concise manner.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      Thanks for watching Sammy

  • @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

  • @andresyesidmorenovilla7888
    @andresyesidmorenovilla7888 5 หลายเดือนก่อน

    Excellent tutorial, complete yet succinct and straight to the point. Thank you so much

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน +1

      Most welcome Andres

  • @user-hm9cu3tl9y
    @user-hm9cu3tl9y 8 หลายเดือนก่อน

    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  8 หลายเดือนก่อน +1

      Most welcome. all the best Manish

  • @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

  • @PkStudio56
    @PkStudio56 5 ปีที่แล้ว +1

    Very good thanks

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      You're welcome

  • @jaminDNB
    @jaminDNB 10 หลายเดือนก่อน

    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  9 หลายเดือนก่อน

      Thanks a ton

  • @kirank5653
    @kirank5653 7 ปีที่แล้ว +2

    Hello Raghav, Thank you for nicely tailored Git, web services and Jenkins tutorials....

    • @RaghavPal
      @RaghavPal  7 ปีที่แล้ว

      I am glad you found it helpful

  • @UmeshKumar-ox3zp
    @UmeshKumar-ox3zp 5 ปีที่แล้ว +1

    Simplest and best git tutorials for beginners. Good job, Raghav!! Keep posting. Thank you.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      You're welcome Umesh

  • @aditimenon2767
    @aditimenon2767 10 หลายเดือนก่อน

    Your entire channel is very informative and precise. Much much regards to you Sir.

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      So happy & humbled to hear that Aditi. Thanks

  • @nileshghadge6887
    @nileshghadge6887 6 ปีที่แล้ว

    Hi Raghav, Your all 5 tutorial on git are awesome. First time i am able to understand git from your video. Thanks to post such awesome understandable video. Please keep it posted for further topics on git.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Great to hear this Nilesh, i will keep adding more interesting and useful videos.

  • @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

  • @ramroy5942
    @ramroy5942 2 ปีที่แล้ว

    I am really a big fan of your style.Thank you uploading the videos

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome

  • @adityapatel5843
    @adityapatel5843 4 ปีที่แล้ว +1

    Clear and to the point. Great video to get started with Git Branching!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Thanks Aditya

  • @OddBallTrails
    @OddBallTrails 5 ปีที่แล้ว +1

    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

  • @farnaazkauser1993
    @farnaazkauser1993 6 ปีที่แล้ว

    please dont stop making videos.. u make concepts easy to understand

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Sure, I will continue this. Thanks Farnaaz

  • @srikanthbolisetty1417
    @srikanthbolisetty1417 4 ปีที่แล้ว

    Thanks, Raghav! Easy to understand.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Most welcome Srikanth

  • @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

  • @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

  • @ankitsethia6534
    @ankitsethia6534 4 ปีที่แล้ว

    Salute to your efforts. Awesome video for anyone to understand. Thanks!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      You're welcome Ankit

  • @philb4462
    @philb4462 11 หลายเดือนก่อน

    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  11 หลายเดือนก่อน

      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 11 หลายเดือนก่อน

      @@RaghavPal Thank you so much! 🙂🙂🙂👍👍👍

  • @udaysabbisetty9509
    @udaysabbisetty9509 3 ปีที่แล้ว

    Awesome explanation

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad you liked it Uday

  • @sadathossainchowdhury631
    @sadathossainchowdhury631 4 ปีที่แล้ว

    Excellent Explanation. Can you make video for git feature branch workflow ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Sadat, yes will plan

  • @nooreinfatima4719
    @nooreinfatima4719 3 ปีที่แล้ว

    It was really helpful. Thanks a lot for such great video.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Most welcome Noorein

  • @shireeshkantharaj7175
    @shireeshkantharaj7175 4 ปีที่แล้ว

    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  4 ปีที่แล้ว

      Hi Shireesh, are they on 2 separate branches, you can merge the branches. Do watch merge and rebase video th-cam.com/video/KWAZl2QHC44/w-d-xo.html

  • @sureshpal5569
    @sureshpal5569 7 หลายเดือนก่อน

    great explanation

    • @RaghavPal
      @RaghavPal  7 หลายเดือนก่อน

      Glad it was helpful Suresh

  • @rajeswarimamilla3895
    @rajeswarimamilla3895 5 ปีที่แล้ว

    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  5 ปีที่แล้ว

      Glad to know this Rajeswari
      I will do more videos soon.

  • @TOBongExpress
    @TOBongExpress 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.

    • @TOBongExpress
      @TOBongExpress 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 ปีที่แล้ว +1

      Ok Sourav

  • @richasingh7723
    @richasingh7723 7 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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 .

  • @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 ปีที่แล้ว +1

      Hi Nipun, yes, you may skip -u here

  • @ishakkhan6233
    @ishakkhan6233 7 ปีที่แล้ว +3

    best videos ever

    • @RaghavPal
      @RaghavPal  7 ปีที่แล้ว

      Thanks Ishak for watching and learning.

  • @a0d1i2
    @a0d1i2 4 ปีที่แล้ว +1

    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  4 ปีที่แล้ว

      Hi Aditya, Did you trying doing a fetch first. This will help you - stackoverflow.com/questions/28429819/rejected-master-master-fetch-first/28429887

  • @RiteshKumar-dx1uz
    @RiteshKumar-dx1uz 6 ปีที่แล้ว +1

    Very informative video.

  • @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.

  • @shubhamagarwal2548
    @shubhamagarwal2548 3 ปีที่แล้ว

    Thank you very much for this tutorial

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      You are welcome Shubham

  • @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.

  • @blake4590
    @blake4590 6 ปีที่แล้ว

    Thank you so much. I really appreciate your helpfulness.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      You're welcome

  • @imtiazdahar8451
    @imtiazdahar8451 3 ปีที่แล้ว

    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  3 ปีที่แล้ว +1

      Hi Imtiaz, there are ways to handle the merge conflicts and changes. I will plan to create a session on this

    • @imtiazdahar8451
      @imtiazdahar8451 3 ปีที่แล้ว

      @@RaghavPal Thank you very much and I look forward to see you again in an other video.

  • @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

  • @ladyharriet4136
    @ladyharriet4136 6 ปีที่แล้ว

    Thank you so much, explain everything clearly.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Thanks for watching.

  • @kamaboko1
    @kamaboko1 6 ปีที่แล้ว

    Great tutorial series. Very informative.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Thanks for watching

  • @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

  • @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

  • @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 ปีที่แล้ว +1

      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

  • @walidnaceri9665
    @walidnaceri9665 4 ปีที่แล้ว

    Thank you very much for your explanation but what is the purpose of the branch?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Walid, Branch is like a parallel version of the code that can be modified without affecting the other versions.

  • @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

  • @wilsoncardoso150
    @wilsoncardoso150 6 ปีที่แล้ว +1

    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

  • @id14u2
    @id14u2 7 ปีที่แล้ว +1

    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

  • @kaltube4817
    @kaltube4817 ปีที่แล้ว

    Well Done!

  • @anjalirawat5599
    @anjalirawat5599 5 ปีที่แล้ว +1

    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 ปีที่แล้ว +1

      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 ปีที่แล้ว +1

      @@RaghavPal Thanks Raghav for the reply. Yeah you explained it in "tag" video.I came across that video later ..thankyou

  • @ImranHossan_myGardening
    @ImranHossan_myGardening 7 ปีที่แล้ว +1

    Nice explanation

  • @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

  • @ibmuser13
    @ibmuser13 5 ปีที่แล้ว

    thanks Raghav for the tutorial

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      You're welcome

  • @rockkersify
    @rockkersify 2 ปีที่แล้ว

    Do we need to use git branch if we are using checkout ?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Vinod, yes, you need to do it on a branch

  • @bmkrissh8714
    @bmkrissh8714 5 ปีที่แล้ว

    How to check - which is active branch if there is more than one?

    • @bmkrissh8714
      @bmkrissh8714 5 ปีที่แล้ว +1

      OK , git branch --list , is the command. * shows active branch

  • @chetna_vlog
    @chetna_vlog 7 ปีที่แล้ว

    Hello Raghav, Do you have any tutorial to migrate from CVS to GIT or CVS to GITLab?

  • @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.

  • @maddysunshine4173
    @maddysunshine4173 3 หลายเดือนก่อน

    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  3 หลายเดือนก่อน

      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

  • @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

  • @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.

  • @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

  • @sweetthirty2
    @sweetthirty2 9 หลายเดือนก่อน

    git add -A , git add* and git add . all are the same commands??

    • @RaghavPal
      @RaghavPal  9 หลายเดือนก่อน +1

      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.

  • @amarnath1494
    @amarnath1494 5 หลายเดือนก่อน

    Hi Raghav , To create a new file, $ Touch (or) dir> "", which on e to use?

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน +1

      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 5 หลายเดือนก่อน

      Thanks for the explanation and your time Raghav

  • @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 ปีที่แล้ว +1

      @@RaghavPal thank you :) please do for sure....this is a must know for me...thanks again.

  • @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/

  • @venkatesh9290
    @venkatesh9290 6 ปีที่แล้ว

    Can you please show the push command that how to use it in git. please

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Venkatesh, push command is covered in the session - th-cam.com/play/PLhW3qG5bs-L8OlICbNX9u4MZ3rAt5c5GG.html

  • @kailashsahoo2607
    @kailashsahoo2607 5 ปีที่แล้ว

    HI Raghav,
    Can you please the PPT (docker,git) in your github so that it will be very helpful for us.

  • @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

  • @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--

  • @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.

  • @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

  • @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

  • @sharatchandra2045
    @sharatchandra2045 5 ปีที่แล้ว

    Good Tutorial

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Thanks for watching Sharat

  • @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

  • @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

  • @biswajitsahu3420
    @biswajitsahu3420 4 ปีที่แล้ว

    Thanks ...

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You're welcome Biswajit

  • @sushantkumar6755
    @sushantkumar6755 4 ปีที่แล้ว +1

    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

  • @abdulwadoodaziz3371
    @abdulwadoodaziz3371 4 ปีที่แล้ว

    Amazing

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Thanks Abdul

  • @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.

  • @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.

  • @Subodhhyd
    @Subodhhyd 4 ปีที่แล้ว

    What if we do not do merge?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      The changes will not come to the parent or master branch

  • @PrasannaMoharanalipp-prasanna
    @PrasannaMoharanalipp-prasanna 5 ปีที่แล้ว

    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  5 ปีที่แล้ว

      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

  • @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

  • @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 ปีที่แล้ว +1

      @@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

  • @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/

  • @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

  • @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.

  • @gaojianjin
    @gaojianjin 7 ปีที่แล้ว

    Your video and audio explanation is not in sync at end part. But thanks for the video anyway.

    • @RaghavPal
      @RaghavPal  7 ปีที่แล้ว

      thanks for liking.
      I did review it again, did not find anything out of sync. Hope this is fine.

  • @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

  • @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

  • @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

  • @varsha5477
    @varsha5477 ปีที่แล้ว

    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  ปีที่แล้ว

      Hi Varsha, pls check this discussion stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn

    • @varsha5477
      @varsha5477 ปีที่แล้ว

      @@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  ปีที่แล้ว

      Hi Varsha, as said, master is just a branch, just that it gets created at 1st, you can rename it too

    • @varsha5477
      @varsha5477 ปีที่แล้ว

      @@RaghavPal ok sir, thank you

  • @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

  • @jimferko9375
    @jimferko9375 3 ปีที่แล้ว

    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  3 ปีที่แล้ว

      Hi Jim, I will update this with a new session

  • @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

  • @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 ปีที่แล้ว +1

      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.

  • @vishalpathak8524
    @vishalpathak8524 5 ปีที่แล้ว +1

    Hi Raghav, Thanks for Tutorial. You explain in very simple way I understand all git commands properly.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      Happy to know that Vishal

  • @rocksneha059
    @rocksneha059 2 ปีที่แล้ว

    awesome explanation