Adding remote in git that is not on GitHub or anyHub









up vote
0
down vote

favorite












Git noobie/intermediate here...



I have a client who says he did git init in a remote folder so I can make git changes.



Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?



I see a .git the folder in there (http://hisdomain/this/is/the/folder/.git) but I don't know how to add the remote, i.e.



git remote add origin http://hisdomain/this/is/the/folder/.git doesn't work.



Typically I see something like http://hisdomain/this/is/the/repo.git for a remote repo, i.e. ending it dot git.



Am I missing the syntax because I can't seem to add the remote correct and get a fatal: repository xyz not found










share|improve this question























  • The problem is you should read first the basics for git. try.github.io then i think you can solve your problem on your own. If you want to share the repo you have to clone it from the remote repository that is hosted on a server or a provider like Github.
    – Stony
    Nov 9 at 22:16










  • git-scm.com/book/en/Git-on-the-Server
    – phd
    Nov 9 at 22:18











  • git-scm.com/book/en/Git-on-the-Server-The-Protocols
    – phd
    Nov 9 at 22:19











  • I understand the basics for sure and use git all the time, but I suppose I could have abbreviated my question to: can git work between any local and remote folders without any repo provide, GitLab/Hub,etc.?
    – Kirk Ross
    Nov 9 at 22:19














up vote
0
down vote

favorite












Git noobie/intermediate here...



I have a client who says he did git init in a remote folder so I can make git changes.



Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?



I see a .git the folder in there (http://hisdomain/this/is/the/folder/.git) but I don't know how to add the remote, i.e.



git remote add origin http://hisdomain/this/is/the/folder/.git doesn't work.



Typically I see something like http://hisdomain/this/is/the/repo.git for a remote repo, i.e. ending it dot git.



Am I missing the syntax because I can't seem to add the remote correct and get a fatal: repository xyz not found










share|improve this question























  • The problem is you should read first the basics for git. try.github.io then i think you can solve your problem on your own. If you want to share the repo you have to clone it from the remote repository that is hosted on a server or a provider like Github.
    – Stony
    Nov 9 at 22:16










  • git-scm.com/book/en/Git-on-the-Server
    – phd
    Nov 9 at 22:18











  • git-scm.com/book/en/Git-on-the-Server-The-Protocols
    – phd
    Nov 9 at 22:19











  • I understand the basics for sure and use git all the time, but I suppose I could have abbreviated my question to: can git work between any local and remote folders without any repo provide, GitLab/Hub,etc.?
    – Kirk Ross
    Nov 9 at 22:19












up vote
0
down vote

favorite









up vote
0
down vote

favorite











Git noobie/intermediate here...



I have a client who says he did git init in a remote folder so I can make git changes.



Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?



I see a .git the folder in there (http://hisdomain/this/is/the/folder/.git) but I don't know how to add the remote, i.e.



git remote add origin http://hisdomain/this/is/the/folder/.git doesn't work.



Typically I see something like http://hisdomain/this/is/the/repo.git for a remote repo, i.e. ending it dot git.



Am I missing the syntax because I can't seem to add the remote correct and get a fatal: repository xyz not found










share|improve this question















Git noobie/intermediate here...



I have a client who says he did git init in a remote folder so I can make git changes.



Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?



I see a .git the folder in there (http://hisdomain/this/is/the/folder/.git) but I don't know how to add the remote, i.e.



git remote add origin http://hisdomain/this/is/the/folder/.git doesn't work.



Typically I see something like http://hisdomain/this/is/the/repo.git for a remote repo, i.e. ending it dot git.



Am I missing the syntax because I can't seem to add the remote correct and get a fatal: repository xyz not found







git






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 9 at 22:37









CodeWizard

49k126688




49k126688










asked Nov 9 at 22:10









Kirk Ross

88311336




88311336











  • The problem is you should read first the basics for git. try.github.io then i think you can solve your problem on your own. If you want to share the repo you have to clone it from the remote repository that is hosted on a server or a provider like Github.
    – Stony
    Nov 9 at 22:16










  • git-scm.com/book/en/Git-on-the-Server
    – phd
    Nov 9 at 22:18











  • git-scm.com/book/en/Git-on-the-Server-The-Protocols
    – phd
    Nov 9 at 22:19











  • I understand the basics for sure and use git all the time, but I suppose I could have abbreviated my question to: can git work between any local and remote folders without any repo provide, GitLab/Hub,etc.?
    – Kirk Ross
    Nov 9 at 22:19
















  • The problem is you should read first the basics for git. try.github.io then i think you can solve your problem on your own. If you want to share the repo you have to clone it from the remote repository that is hosted on a server or a provider like Github.
    – Stony
    Nov 9 at 22:16










  • git-scm.com/book/en/Git-on-the-Server
    – phd
    Nov 9 at 22:18











  • git-scm.com/book/en/Git-on-the-Server-The-Protocols
    – phd
    Nov 9 at 22:19











  • I understand the basics for sure and use git all the time, but I suppose I could have abbreviated my question to: can git work between any local and remote folders without any repo provide, GitLab/Hub,etc.?
    – Kirk Ross
    Nov 9 at 22:19















The problem is you should read first the basics for git. try.github.io then i think you can solve your problem on your own. If you want to share the repo you have to clone it from the remote repository that is hosted on a server or a provider like Github.
– Stony
Nov 9 at 22:16




The problem is you should read first the basics for git. try.github.io then i think you can solve your problem on your own. If you want to share the repo you have to clone it from the remote repository that is hosted on a server or a provider like Github.
– Stony
Nov 9 at 22:16












git-scm.com/book/en/Git-on-the-Server
– phd
Nov 9 at 22:18





git-scm.com/book/en/Git-on-the-Server
– phd
Nov 9 at 22:18













git-scm.com/book/en/Git-on-the-Server-The-Protocols
– phd
Nov 9 at 22:19





git-scm.com/book/en/Git-on-the-Server-The-Protocols
– phd
Nov 9 at 22:19













I understand the basics for sure and use git all the time, but I suppose I could have abbreviated my question to: can git work between any local and remote folders without any repo provide, GitLab/Hub,etc.?
– Kirk Ross
Nov 9 at 22:19




I understand the basics for sure and use git all the time, but I suppose I could have abbreviated my question to: can git work between any local and remote folders without any repo provide, GitLab/Hub,etc.?
– Kirk Ross
Nov 9 at 22:19












2 Answers
2






active

oldest

votes

















up vote
0
down vote













Hosting software like github or gitlab is not required.



If you are able to see their git folder by browsing to, in your example, http://hisdomain/this/is/the/folder/.git, then the remote URL should be http://hisdomain/this/is/the/folder. (That is, the URL does not go all the way into the .git metadata folder; and in fact it would be more typical for the central repo to be bare, so that it wouldn't have a .git folder at all.) In this scenario, the web server is the only server software required (so long as things are configured correctly on their end).



Also you can use a relative path or file:// URL if you have direct filesystem access to the repo (as in a shared drive).



And it is common to use ssh as the remote access mechanism as well.



Software like github is popular and can add a lot of useful features for team collaboration, but git does not require them and can be used in distributed fashion on its own.






share|improve this answer



























    up vote
    0
    down vote













    git init




    I have a client who says he did git init in a remote folder so I can make git changes.




    git init will allow you to start track changes with git in the current folder. The outcome is :




    • .git, a folder in the current directory


    • master branch which is the default branch

    enter image description here



    git remote




    Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?




    Git can be attached (git remote) to any (single or multiple) servers(s) locally or on remote servers.



    # Add remote to your git repository
    git remote add origin https://github.com/<user>/dummy1.git

    # Check to see a list of your remotes
    git remote -v





    share|improve this answer




















      Your Answer






      StackExchange.ifUsing("editor", function ()
      StackExchange.using("externalEditor", function ()
      StackExchange.using("snippets", function ()
      StackExchange.snippets.init();
      );
      );
      , "code-snippets");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "1"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233900%2fadding-remote-in-git-that-is-not-on-github-or-anyhub%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      Hosting software like github or gitlab is not required.



      If you are able to see their git folder by browsing to, in your example, http://hisdomain/this/is/the/folder/.git, then the remote URL should be http://hisdomain/this/is/the/folder. (That is, the URL does not go all the way into the .git metadata folder; and in fact it would be more typical for the central repo to be bare, so that it wouldn't have a .git folder at all.) In this scenario, the web server is the only server software required (so long as things are configured correctly on their end).



      Also you can use a relative path or file:// URL if you have direct filesystem access to the repo (as in a shared drive).



      And it is common to use ssh as the remote access mechanism as well.



      Software like github is popular and can add a lot of useful features for team collaboration, but git does not require them and can be used in distributed fashion on its own.






      share|improve this answer
























        up vote
        0
        down vote













        Hosting software like github or gitlab is not required.



        If you are able to see their git folder by browsing to, in your example, http://hisdomain/this/is/the/folder/.git, then the remote URL should be http://hisdomain/this/is/the/folder. (That is, the URL does not go all the way into the .git metadata folder; and in fact it would be more typical for the central repo to be bare, so that it wouldn't have a .git folder at all.) In this scenario, the web server is the only server software required (so long as things are configured correctly on their end).



        Also you can use a relative path or file:// URL if you have direct filesystem access to the repo (as in a shared drive).



        And it is common to use ssh as the remote access mechanism as well.



        Software like github is popular and can add a lot of useful features for team collaboration, but git does not require them and can be used in distributed fashion on its own.






        share|improve this answer






















          up vote
          0
          down vote










          up vote
          0
          down vote









          Hosting software like github or gitlab is not required.



          If you are able to see their git folder by browsing to, in your example, http://hisdomain/this/is/the/folder/.git, then the remote URL should be http://hisdomain/this/is/the/folder. (That is, the URL does not go all the way into the .git metadata folder; and in fact it would be more typical for the central repo to be bare, so that it wouldn't have a .git folder at all.) In this scenario, the web server is the only server software required (so long as things are configured correctly on their end).



          Also you can use a relative path or file:// URL if you have direct filesystem access to the repo (as in a shared drive).



          And it is common to use ssh as the remote access mechanism as well.



          Software like github is popular and can add a lot of useful features for team collaboration, but git does not require them and can be used in distributed fashion on its own.






          share|improve this answer












          Hosting software like github or gitlab is not required.



          If you are able to see their git folder by browsing to, in your example, http://hisdomain/this/is/the/folder/.git, then the remote URL should be http://hisdomain/this/is/the/folder. (That is, the URL does not go all the way into the .git metadata folder; and in fact it would be more typical for the central repo to be bare, so that it wouldn't have a .git folder at all.) In this scenario, the web server is the only server software required (so long as things are configured correctly on their end).



          Also you can use a relative path or file:// URL if you have direct filesystem access to the repo (as in a shared drive).



          And it is common to use ssh as the remote access mechanism as well.



          Software like github is popular and can add a lot of useful features for team collaboration, but git does not require them and can be used in distributed fashion on its own.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 9 at 22:40









          Mark Adelsberger

          19k11019




          19k11019






















              up vote
              0
              down vote













              git init




              I have a client who says he did git init in a remote folder so I can make git changes.




              git init will allow you to start track changes with git in the current folder. The outcome is :




              • .git, a folder in the current directory


              • master branch which is the default branch

              enter image description here



              git remote




              Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?




              Git can be attached (git remote) to any (single or multiple) servers(s) locally or on remote servers.



              # Add remote to your git repository
              git remote add origin https://github.com/<user>/dummy1.git

              # Check to see a list of your remotes
              git remote -v





              share|improve this answer
























                up vote
                0
                down vote













                git init




                I have a client who says he did git init in a remote folder so I can make git changes.




                git init will allow you to start track changes with git in the current folder. The outcome is :




                • .git, a folder in the current directory


                • master branch which is the default branch

                enter image description here



                git remote




                Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?




                Git can be attached (git remote) to any (single or multiple) servers(s) locally or on remote servers.



                # Add remote to your git repository
                git remote add origin https://github.com/<user>/dummy1.git

                # Check to see a list of your remotes
                git remote -v





                share|improve this answer






















                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  git init




                  I have a client who says he did git init in a remote folder so I can make git changes.




                  git init will allow you to start track changes with git in the current folder. The outcome is :




                  • .git, a folder in the current directory


                  • master branch which is the default branch

                  enter image description here



                  git remote




                  Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?




                  Git can be attached (git remote) to any (single or multiple) servers(s) locally or on remote servers.



                  # Add remote to your git repository
                  git remote add origin https://github.com/<user>/dummy1.git

                  # Check to see a list of your remotes
                  git remote -v





                  share|improve this answer












                  git init




                  I have a client who says he did git init in a remote folder so I can make git changes.




                  git init will allow you to start track changes with git in the current folder. The outcome is :




                  • .git, a folder in the current directory


                  • master branch which is the default branch

                  enter image description here



                  git remote




                  Am I wrong that a repo must be hosted on GitHub or GitLab or some other place?




                  Git can be attached (git remote) to any (single or multiple) servers(s) locally or on remote servers.



                  # Add remote to your git repository
                  git remote add origin https://github.com/<user>/dummy1.git

                  # Check to see a list of your remotes
                  git remote -v






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 9 at 22:47









                  CodeWizard

                  49k126688




                  49k126688



























                       

                      draft saved


                      draft discarded















































                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53233900%2fadding-remote-in-git-that-is-not-on-github-or-anyhub%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Use pre created SQLite database for Android project in kotlin

                      Darth Vader #20

                      Ondo