Git remote repository tutorial and with set-url origin upstream example

Поделиться
HTML-код
  • Опубликовано: 26 ноя 2020
  • Keep your forked repo up to date or if the repo changes location, or you clone the original / parent repo and then you make a fork, it is easy to update your cloned version that is locally to point to another location with 1 or 2 simple git CLI commands.
    Example commands
    $ git remote -v
    $ git remote remove origin
    $ git remote add origin [URL]
    $ git remote set-url origin [URL]
    Shoutout
    Thanks Nicholas Carrigan for the alternative suggestion which is even easier. Follow Nicholas on
    Twitter / nhcarrigan
    GitHub github.com/nhcarrigan
    Git remote official docs git-scm.com/docs/git-remote
    Git remote repository tutorial and with set-url origin upstream example #OpenSource #DevRel
    --------------------------------------------------------------------------
    A BIG thank you to my GitHub Sponsor:
    - Stephen Mount github.com/stemount
    --------------------------------------------------------------------------
    Don’t forget to support my channel by subscribing below, it’s free, and also share with your friends. Subscribe now!!
    ruclips.net/user/eddiejaoude?sub_co...
    Follow on other socials for behind the scenes footage, join discord to continue the conversation...
    eddiejaoude.co.uk
    github.com/eddiejaoude
    / eddiejaoude
    / eddiejaoude
    / eddiejaoude
    / eddiejaoude
    / discord
  • НаукаНаука

Комментарии • 61

  • @eddiejaoude
    @eddiejaoude  3 года назад +1

    How do you change the repo remote?

    • @alrifay
      @alrifay 3 года назад +2

      git remote set-url 😁

    • @eddiejaoude
      @eddiejaoude  3 года назад

      @@alrifay that is the better way! :)

  • @janusu
    @janusu Год назад +2

    Lifesaver!! Thanks for this short and to-the-point tutorial. And have a 👍 while you're at it.
    I used the first approach you demonstrated because I could understand more clearly what was happening.

    • @eddiejaoude
      @eddiejaoude  Год назад

      Glad it helped! Thank you for the great feedback and support Kent!

  • @raulalvarado7025
    @raulalvarado7025 2 года назад +1

    This video is by far the cleanest explanation to set up upstream and why great video!!

    • @eddiejaoude
      @eddiejaoude  2 года назад

      Thank you so much Raul for that amazing feedback!

  • @itsbond007
    @itsbond007 3 года назад +2

    This was very informative.
    Thanks for making this video Eddie 🙂

    • @eddiejaoude
      @eddiejaoude  3 года назад +1

      Thank you for the awesome feedback 👍

  • @sergio_saad
    @sergio_saad 4 месяца назад

    great video, simple, direct to the point. Cangrats.

  • @nimitsavant3127
    @nimitsavant3127 3 года назад +1

    Wow, Thanks that was so cool!

    • @eddiejaoude
      @eddiejaoude  3 года назад

      Thank you Nimit for the great feedback! I am glad it helped :)

  • @CareerProgramming
    @CareerProgramming 3 года назад +2

    Great tutorial!

  • @Vamsibl
    @Vamsibl 2 года назад +1

    It is very helpful thanks.

    • @eddiejaoude
      @eddiejaoude  2 года назад

      Thank you for the great feedback and support 👍

  • @nimitsavant3127
    @nimitsavant3127 3 года назад +2

    I come here every week, when will I remember this D:
    Thank @Eddi Jaoude for the wonderful video :D

    • @eddiejaoude
      @eddiejaoude  3 года назад +1

      lol thank you! no worries, it happens. I appreciate the great feedback! Let me know what videos you would like to see?

  • @alrifay
    @alrifay 3 года назад +3

    First 🎉😎

  • @sourena_pa
    @sourena_pa 2 года назад +1

    Thank you Eddie 🎖

    • @eddiejaoude
      @eddiejaoude  2 года назад

      Thank you for the great feedback!

  • @dorandegeb
    @dorandegeb 9 месяцев назад +1

    Thank you it came so handy

    • @eddiejaoude
      @eddiejaoude  9 месяцев назад

      Great 🎉🎉 thank you

  • @narayanaswamy6329
    @narayanaswamy6329 3 года назад +1

    Thanks eddie, for this video

    • @eddiejaoude
      @eddiejaoude  3 года назад

      No problem. Thank you for the great feedback. Let me know what other videos you would like to see?

  • @JaberAhmed4770
    @JaberAhmed4770 2 года назад +1

    Thank you! love from Bangladesh!

    • @eddiejaoude
      @eddiejaoude  2 года назад +1

      Glad it was useful, thank you for the great feedback Jaber!

    • @JaberAhmed4770
      @JaberAhmed4770 2 года назад +1

      @@eddiejaoude Welcome

    • @eddiejaoude
      @eddiejaoude  2 года назад +1

      @@JaberAhmed4770 btw let me know what other videos you would like to see?

    • @JaberAhmed4770
      @JaberAhmed4770 2 года назад

      @@eddiejaoude yeah!
      I will see.

  • @munysovannthoeunvy5613
    @munysovannthoeunvy5613 2 года назад +1

    Thanks sir you saved me :)

    • @eddiejaoude
      @eddiejaoude  2 года назад

      Awesome! Thank you for the great feedback 👍

  • @wzup23
    @wzup23 6 месяцев назад +1

    thanks dude

  • @ishuchauhan7138
    @ishuchauhan7138 Год назад +1

    nicee

  • @bagup_alpharetards
    @bagup_alpharetards 3 года назад +1

    Awesome explanation !! keep it up.

    • @eddiejaoude
      @eddiejaoude  3 года назад +1

      Thank you for the great feedback 👍 I have more videos coming very soon. Any videos you would like to see?

    • @bagup_alpharetards
      @bagup_alpharetards 3 года назад +1

      @@eddiejaoude Yes !! it would be awesome if you make some related to github.

    • @eddiejaoude
      @eddiejaoude  3 года назад +1

      @@bagup_alpharetards thank you for the feedback. Have you seen this free mini bootcamp I did on GitHub? ruclips.net/video/SYtPC9tHYyQ/видео.html

    • @bagup_alpharetards
      @bagup_alpharetards 3 года назад +1

      @@eddiejaoude I haven't yet but sure i will watch it today. Thanks man !!

    • @eddiejaoude
      @eddiejaoude  3 года назад +1

      @@bagup_alpharetards awesome! let me know your feedback on it and I can do a part 2 if anything is missing :)

  • @bb-so2ob
    @bb-so2ob Год назад

    @Eddie Jaoude After adding as per the video, i see error as "fatal: couldn't find remote ref upstream" when I try to pull using "git pull origin upstream". I have added my original repo as upstream, forked repo as origin.

    • @eddiejaoude
      @eddiejaoude  Год назад

      Could you join the EddieHub Discord, it is easier to problem solve there discord.eddiehub.org

  • @nikhilbhat8443
    @nikhilbhat8443 6 месяцев назад +1

    Hi, is there a way we can pull from the original repo and push my changes to my forked repo? I mean, can we also give a url while doing git pull, eg - git pull upstream ??

    • @eddiejaoude
      @eddiejaoude  6 месяцев назад +1

      yes of course, you select destination first
      git pull origin "BRANCH-NAME"
      git push remote "BRANCH-NAME"

  • @hattorihanzo8788
    @hattorihanzo8788 Год назад +1

    Good video. Can you please provide an update. Seems like when you fork a repo now, you have the upstream already configured.

    • @eddiejaoude
      @eddiejaoude  Год назад +1

      oh sure, let me take a look, thank you

  • @gamingheroyt5354
    @gamingheroyt5354 Год назад

    Which software You used for the changes bro

  • @chrisdebrah9295
    @chrisdebrah9295 Год назад

    i created a folder with files in it on my local machine without a github repo and i wanted to now push it to github without creating a new repo at the github website but i want to create it automatically by pushing it there. is that possible?

    • @eddiejaoude
      @eddiejaoude  Год назад +1

      I think you can use the GitHub CLI to do it, but you can't do it with git alone

  • @mitravindgarg5372
    @mitravindgarg5372 3 года назад +1

    How are you able to clone if you don't have access to mhxion account ? Please correct me if I am wrong that if a user is able to clone a repository then same user should be able to push data on that repository. Awaiting your response...Great Video Otherwise..Good Work !

    • @eddiejaoude
      @eddiejaoude  3 года назад

      We can clone any public repo. Public repos have read access to everyone, but they ca not push because they do not have write access. I hope that makes sense. Any questions let me know :)

  • @skepticgoat7591
    @skepticgoat7591 11 месяцев назад

    how do i do a git pull from the upstrem? if i i do git fetch upstream and git pull it will pull from the origin?

    • @eddiejaoude
      @eddiejaoude  11 месяцев назад

      You need to do the following...
      1. git fetch upstream
      2. git merge upstream/main

  • @TrendyTales-ep9yq
    @TrendyTales-ep9yq Месяц назад

    will this work if my original source code is in github repo and I am mirroring it in my bitbucket repo. How will I update my bitbucket repo with new changes from github?

    • @eddiejaoude
      @eddiejaoude  Месяц назад

      Each location will have it's own remote

    • @TrendyTales-ep9yq
      @TrendyTales-ep9yq Месяц назад

      @@eddiejaoude sir can you please explain it in brief , sorry but I didnt get it.